From d7a7108f9b6a2d43b2ada92e691e5c8ffa2342e8 Mon Sep 17 00:00:00 2001 From: Tekiter Date: Sat, 27 Jan 2024 16:07:50 +0900 Subject: [PATCH] =?UTF-8?q?feat:=204=EA=B8=B0=20=EB=AA=A8=EC=A7=91=20?= =?UTF-8?q?=EC=A4=80=EB=B9=84=20=EB=B0=98=EC=98=81=20(#70)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/error.tsx | 2 +- .../{ => AboutRecruit}/NoticeButton.tsx | 0 .../{ => AboutRecruit}/RecruitButton.tsx | 28 ++++++++++++---- .../components/common/AboutRecruit/index.tsx | 13 ++++++++ apps/web/src/components/common/SimpleMenu.tsx | 33 +++++++++++++++++++ .../components/mainpage/floating/Footer.tsx | 25 +++++++------- .../components/mainpage/greeting/Intro.tsx | 6 ++-- .../mainpage/recruit/RecruitSection.tsx | 7 ++-- 8 files changed, 83 insertions(+), 31 deletions(-) rename apps/web/src/components/common/{ => AboutRecruit}/NoticeButton.tsx (100%) rename apps/web/src/components/common/{ => AboutRecruit}/RecruitButton.tsx (63%) create mode 100644 apps/web/src/components/common/AboutRecruit/index.tsx create mode 100644 apps/web/src/components/common/SimpleMenu.tsx diff --git a/apps/web/src/app/error.tsx b/apps/web/src/app/error.tsx index ebefb9a..93165ef 100644 --- a/apps/web/src/app/error.tsx +++ b/apps/web/src/app/error.tsx @@ -16,7 +16,7 @@ export default function Error({ error, reset }: { error: Error; reset: () => voi () => reset() } > - Try again + 재시도 ); diff --git a/apps/web/src/components/common/NoticeButton.tsx b/apps/web/src/components/common/AboutRecruit/NoticeButton.tsx similarity index 100% rename from apps/web/src/components/common/NoticeButton.tsx rename to apps/web/src/components/common/AboutRecruit/NoticeButton.tsx diff --git a/apps/web/src/components/common/RecruitButton.tsx b/apps/web/src/components/common/AboutRecruit/RecruitButton.tsx similarity index 63% rename from apps/web/src/components/common/RecruitButton.tsx rename to apps/web/src/components/common/AboutRecruit/RecruitButton.tsx index 4f9b6c2..0a775ed 100644 --- a/apps/web/src/components/common/RecruitButton.tsx +++ b/apps/web/src/components/common/AboutRecruit/RecruitButton.tsx @@ -1,11 +1,10 @@ 'use client'; import dayjs from 'dayjs'; -import Link from 'next/link'; import React, { useEffect, useState } from 'react'; export default function RecruitButton() { - const [timeLeft, setTimeLeft] = useState(''); + const [_timeLeft, setTimeLeft] = useState(''); useEffect(() => { const deadline = dayjs('2023-08-07T14:59:00.000Z'); @@ -44,12 +43,27 @@ export default function RecruitButton() { }, []); return ( - { + alert('모집이 시작되면 다시 찾아와 주세요!'); + }} className='bg-dark1 mb-[3rem] mt-[4rem] rounded-[1.2rem] border border-solid border-[#808388] px-[4rem] py-[1.6rem]' > -

3기 합류하기 (~8/7)

-

{timeLeft}

- +

+ 곧 4기 모집이 시작됩니다. +
+ (1월 29일 월 ~ ) +

+ ); + + // return ( + // + //

4기 합류하기 (~2/7)

+ // {/*

{timeLeft}

*/} + // + // ); } diff --git a/apps/web/src/components/common/AboutRecruit/index.tsx b/apps/web/src/components/common/AboutRecruit/index.tsx new file mode 100644 index 0000000..812f6bd --- /dev/null +++ b/apps/web/src/components/common/AboutRecruit/index.tsx @@ -0,0 +1,13 @@ +import { FC } from 'react'; + +import RecruitButton from './RecruitButton'; + +interface AboutRecruitProps {} + +// 모집 상태가 바뀌면 여기의 버튼을 상황에 맞게 으로 바꿔주면 됩니다. + +const AboutRecruit: FC = ({}) => { + return ; +}; + +export default AboutRecruit; diff --git a/apps/web/src/components/common/SimpleMenu.tsx b/apps/web/src/components/common/SimpleMenu.tsx new file mode 100644 index 0000000..2f0ffbe --- /dev/null +++ b/apps/web/src/components/common/SimpleMenu.tsx @@ -0,0 +1,33 @@ +'use client'; + +import { FC, useEffect, useState } from 'react'; + +import AboutRecruit from './AboutRecruit'; + +interface SimpleMenuProps {} + +const SimpleMenu: FC = ({}) => { + const [isShowMenu, setIsShowMenu] = useState(false); + + useEffect(() => { + const pid = setTimeout(() => { + setIsShowMenu(true); + }, 5000); + + return () => { + clearTimeout(pid); + }; + }, []); + + if (!isShowMenu) { + return null; + } + + return ( +
+ +
+ ); +}; + +export default SimpleMenu; diff --git a/apps/web/src/components/mainpage/floating/Footer.tsx b/apps/web/src/components/mainpage/floating/Footer.tsx index 9edf480..18f509c 100644 --- a/apps/web/src/components/mainpage/floating/Footer.tsx +++ b/apps/web/src/components/mainpage/floating/Footer.tsx @@ -1,16 +1,13 @@ -import Link from 'next/link'; - -import { RightArrowIcon } from '../../common/RightArrowIcon'; - export default function Footer() { - return ( - - - - ); + return null; + // return ( + // + // + // + // ); } diff --git a/apps/web/src/components/mainpage/greeting/Intro.tsx b/apps/web/src/components/mainpage/greeting/Intro.tsx index 324768b..8ea255d 100644 --- a/apps/web/src/components/mainpage/greeting/Intro.tsx +++ b/apps/web/src/components/mainpage/greeting/Intro.tsx @@ -4,8 +4,7 @@ import clsx from 'clsx'; import { m, useScroll, useTransform } from 'framer-motion'; import { SVGProps, useRef } from 'react'; -import NoticeButton from '@/components/common/NoticeButton'; -// import RecruitButton from '@/components/common/RecruitButton'; +import AboutRecruit from '@/components/common/AboutRecruit'; interface GreetingProps { className?: string; @@ -32,8 +31,7 @@ export default function Intro({ className }: GreetingProps) { SOPT에 없던 새로운 가치를
프로덕트를 통해 만들어 갑니다. - {/* */} - + diff --git a/apps/web/src/components/mainpage/recruit/RecruitSection.tsx b/apps/web/src/components/mainpage/recruit/RecruitSection.tsx index 6dda2f9..d6457f0 100644 --- a/apps/web/src/components/mainpage/recruit/RecruitSection.tsx +++ b/apps/web/src/components/mainpage/recruit/RecruitSection.tsx @@ -3,9 +3,7 @@ import { m, useInView } from 'framer-motion'; import { useRef } from 'react'; -import NoticeButton from '@/components/common/NoticeButton'; - -// import RecruitButton from '../../common/RecruitButton'; +import AboutRecruit from '@/components/common/AboutRecruit'; export default function RecruitSection() { const ref = useRef(null); @@ -31,8 +29,7 @@ export default function RecruitSection() {
메이커스에 합류하세요 - {/* */} - +