Skip to content

Commit

Permalink
recruit Link 가 적용안되던 오류를 만들었습니다.
Browse files Browse the repository at this point in the history
  • Loading branch information
loopy-lim authored Mar 4, 2024
2 parents e243b0f + 494f9e4 commit 1971729
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 67 deletions.
33 changes: 11 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/components/common/Hamberger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import econovationWhiteLogo from "/public/images/econovation-white.svg";
import { LinkTo } from "./LinkTo";
import { cn } from "@/src/functions/util";
import { Icon } from "./Icon";
import { URLS } from "@/src/constants/url.ko";

interface HambergerChildMenuProps {
hamburgerChildData: { NAME: string; LINK: string }[];
hamburgerChildData: { NAME: string; LINK: keyof typeof URLS }[];
isOpen: boolean;
}

Expand Down
12 changes: 4 additions & 8 deletions src/components/common/LinkTo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Link from "next/link";
import { cn } from "@/src/functions/util";

interface LinkToProps {
link: string;
link: keyof typeof URLS;
className?: string;
children: ReactElement[] | ReactElement | string[] | string;
onClick?: () => void;
Expand All @@ -27,16 +27,12 @@ export const LinkTo: FC<LinkToProps> = ({
const setIsLoading = useSetAtom(loadingState);
const router = useRouter();
const viewLoading = debounce(() => {
router.push(URLS[link as keyof typeof URLS].LINK);
router.push(URLS[link].LINK);
}, 600);
return (
<Link
href={URLS[link as keyof typeof URLS].LINK}
onClick={(e) => {
e.preventDefault();
if (target === "_blank") {
return window.open(URLS[link as keyof typeof URLS].LINK);
}
href={URLS[link].LINK}
onClick={() => {
setIsLoading(true);
onClick && onClick();
viewLoading();
Expand Down
16 changes: 7 additions & 9 deletions src/components/portfolio/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,13 @@ export const PortfolioNavbar = () => {
<div className="portfolio-menu-subtitles fixed top-48 -z-10 flex w-full flex-col items-center gap-4 text-7xl font-bold opacity-0 max-lg:top-14 max-lg:scale-[.5]">
{PORTFOLIO_MENU.map((menu, index) => (
<LinkTo key={index} link={menu.LINK}>
{
<div
className={cn({
"text-gray-400": !isUrlMatch(menu.LINK),
})}
>
{menu.NAME}
</div>
}
<div
className={cn({
"text-gray-400": !isUrlMatch(menu.LINK),
})}
>
{menu.NAME}
</div>
</LinkTo>
))}
</div>
Expand Down
24 changes: 12 additions & 12 deletions src/components/recruit/Recruit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,39 @@ export const Recruit = () => {
}, []);

return (
<div className="flex flex-col justify-center items-center text-xl leading-relaxed h-screen">
<div className="flex h-screen flex-col items-center justify-center text-xl leading-relaxed">
<HambergerMenu />
<div>
<h1 className="text-[9.5rem] uppercase font-bold text-center my-8 leading-[9.5rem]">
<h1 className="my-8 text-center text-[9.5rem] font-bold uppercase leading-[9.5rem]">
{RECRUIT.TITLE}
</h1>
<div className="text-center my-20">
<div className="my-20 text-center">
{RECRUIT.CONTENT.split("\n").map((d, i) => (
<div key={i}>{d}</div>
))}
</div>
{RECRUIT.IS_ON && (
<div className="flex items-center justify-center mt-24 mb-32">
<LinkTo
link="APPLY_LINK"
className="flex bg-[#0038FF] text-white px-6 py-3 gap-4 rounded-full text-xl items-center"
<div className="mb-32 mt-24 flex items-center justify-center">
<a
href="https://recruit.econovation.kr/application"
className="flex items-center gap-4 rounded-full bg-[#0038FF] px-6 py-3 text-xl text-white"
>
<span>{RECRUIT.GENERTAION}기 지원하기</span>
<img
className="h-6"
src="/icons/right-arrow-circle-white.svg"
alt="right arrow"
/>
</LinkTo>
</a>
</div>
)}
</div>
<div className="w-full grid grid-cols-[repeat(2,minmax(16rem,_1fr))] gap-16 xl:grid-cols-[repeat(4,minmax(16rem,_1fr))]">
<div className="grid w-full grid-cols-[repeat(2,minmax(16rem,_1fr))] gap-16 xl:grid-cols-[repeat(4,minmax(16rem,_1fr))]">
{RECRUIT.SCHEDULE.map((d, i) => (
<div className="w-full" key={i}>
<div className="text-6xl mb-6 tracking-tighter">{d.DATE}</div>
<div className="recruit-skedule-arrow border-t-[0.5px] w-0 border-black relative after:border-t-[1px] after:border-r-[1px] after:rotate-45 after:right-[1px] after:-bottom-[6px] after:h-[12px] after:w-[12px] after:absolute after:border-black"></div>
<div className="text-lg mt-4">{d.TEXT}</div>
<div className="mb-6 text-6xl tracking-tighter">{d.DATE}</div>
<div className="recruit-skedule-arrow relative w-0 border-t-[0.5px] border-black after:absolute after:-bottom-[6px] after:right-[1px] after:h-[12px] after:w-[12px] after:rotate-45 after:border-r-[1px] after:border-t-[1px] after:border-black"></div>
<div className="mt-4 text-lg">{d.TEXT}</div>
</div>
))}
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/recruit/Subscription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ const { SUBSCRIPTION } = RECRUIT;

export const Subscription = () => {
return (
<div className="flex justify-between my-96">
<h1 className="uppercase font-medium flex-1 mr-4">
<div className="my-96 flex justify-between">
<h1 className="mr-4 flex-1 font-medium uppercase">
{SUBSCRIPTION.TITLE}
</h1>
<div className="flex-[2_1_0%]">
<div className="flex w-full justify-between">
{SUBSCRIPTION.CONTENTS.map((d, i) => (
<div
className="flex flex-col justify-between w-full h-80 px-8 min-w-[23rem] border-r border-black last:border-r-0 relative first:pl-0 last:pr-0 last:min-w-[20rem]"
className="relative flex h-80 w-full min-w-[23rem] flex-col justify-between border-r border-black px-8 first:pl-0 last:min-w-[20rem] last:border-r-0 last:pr-0"
key={i}
>
<div className="text-3xl font-normal">{d.TITLE}</div>
{d.LINK ? (
<LinkTo
link={d.LINK}
className="flex items-center gap-4 absolute top-14"
className="absolute top-14 flex items-center gap-4"
target="_blank"
>
<img
Expand All @@ -37,7 +37,7 @@ export const Subscription = () => {
""
)}
<div className="text-lg">
<div className="font-semibold mb-4">
<div className="mb-4 font-semibold">
{d.CONTENT.split("\n").map((cd, ci) => (
<div key={ci}>{cd}</div>
))}
Expand Down
17 changes: 11 additions & 6 deletions src/constants/common.ko.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PORTFOLIO_MENU } from "./portfolio/portfolio.ko";
import { URLS } from "./url.ko";

const MAIN = {
SUBTITLE: "coding connected",
Expand All @@ -9,13 +10,13 @@ const FOOTER = {
CONTACT: [
{ NAME: "kakao", LINK: "KAKAO_LINK" },
{ NAME: "e-mail", LINK: "EMAIL_LINK" },
],
] as { NAME: string; LINK: keyof typeof URLS }[],
SOCIAL: [
{ NAME: "instagram", LINK: "INSTAGRAM_LINK" },
{ NAME: "facebook", LINK: "FACEBOOK_LINK" },
{ NAME: "medium", LINK: "MEDIUM_LINK" },
{ NAME: "youtube", LINK: "YOUTUBE_LINK" },
],
] as { NAME: string; LINK: keyof typeof URLS }[],
ADDRESS: {
EN: "77. youngbong-ro, buk-gu, gwangju, republic of korea",
KO: "전남대학교 정보화본부 101호",
Expand Down Expand Up @@ -56,27 +57,31 @@ const HAMBGER_MENU = {
},
{ NAME: "recruit", LINK: "RECRUIT" },
{ NAME: "contact", LINK: "CONTACT" },
],
] as {
NAME: string;
LINK: keyof typeof URLS;
CHILDREN?: { NAME: string; LINK: keyof typeof URLS }[];
}[],
};

const SERVICES = {
ECONOVATION_DEV: {
TITLE: "econovation dev",
TITLE_KO: "지난 데브 다시보기",
LINK: "PORTFOLIO_DEV",
LINK: "PORTFOLIO_DEV" as keyof typeof URLS,
},
ECONO_RECRUIT: {
TITLE: "econo recruit",
TITLE_KO: "에코노베이션 신입모집 TF",
SUBTITLE: "member only",
SUBTITLE_KO: "회원 전용 페이지",
LINK: "ECONO_RECRUIT",
LINK: "ECONO_RECRUIT" as keyof typeof URLS,
},
OTHER: [
{
TITLE: "EEOS",
TITLE_KO: "에코노베이션 행사 관리 시스템",
LINK: "EEOS",
LINK: "EEOS" as keyof typeof URLS,
},
],
};
Expand Down
9 changes: 8 additions & 1 deletion src/constants/main.ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Head4 from "@/public/home/head_4.png";
import Pation from "@/public/home/passion.jpg";
import Communication from "@/public/home/communication.jpg";
import Faithful from "@/public/home/faithful.jpg";
import { URLS } from "./url.ko";

const ECONOVATION = "econovation";

Expand Down Expand Up @@ -65,7 +66,13 @@ const MISSION = [
},
];

const MAIN_NAV = [
interface MainNavType {
NAME: string;
LINK: keyof typeof URLS;
POSITION: "left" | "right";
}

const MAIN_NAV: MainNavType[] = [
{
NAME: "home",
LINK: "HOME",
Expand Down
8 changes: 7 additions & 1 deletion src/constants/portfolio/portfolio.ko.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { URLS } from "../url.ko";
import { winter2020 } from "./ko/2019-2";
import { summer2020 } from "./ko/2020-1";
import { winter2021 } from "./ko/2020-2";
Expand All @@ -21,7 +22,12 @@ const PORTFOLIO = {
],
};

const PORTFOLIO_MENU = [
interface PortfolioMenuType {
NAME: string;
LINK: keyof typeof URLS;
}

const PORTFOLIO_MENU: PortfolioMenuType[] = [
{ NAME: "DEV", LINK: "PORTFOLIO_DEV" },
{ NAME: "HACKATHON", LINK: "PORTFOLIO_HACKATHON" },
{ NAME: "SERVICE", LINK: "PORTFOLIO_SERVICE" },
Expand Down
6 changes: 4 additions & 2 deletions src/constants/recruit/recruit.ko.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { URLS } from "../url.ko";

const RECRUIT = {
TITLE: "recruit",
CONTENT:
Expand Down Expand Up @@ -73,15 +75,15 @@ const RECRUIT = {
CONTENTS: [
{
TITLE: "주간 발표 참석",
LINK: "WEEK_ANOUNCE_REFERENCE",
LINK: "WEEK_ANOUNCE_REFERENCE" as keyof typeof URLS,
CONTENT:
"에코노베이션 활동회원은 매주 금요일\n주간 발표에 필수로 참여해야 합니다.",
SUBCONTENT:
"주간 발표는 각 팀이 진행 상황을 발표하고\n프로젝트 간 겪었던 문제들을 공유합니다.",
},
{
TITLE: "최종 발표 DEV",
LINK: "LAST_ANOUNCE_VIDEO",
LINK: "LAST_ANOUNCE_VIDEO" as keyof typeof URLS,
CONTENT:
"활동 회원은 1월, 7월에 진행하는\n최종발표인 DEV에 참여해야 합니다.",
SUBCONTENT:
Expand Down

0 comments on commit 1971729

Please sign in to comment.