Skip to content

Commit

Permalink
feat : add Recruit Page UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SeojinSeojin committed Sep 2, 2023
1 parent e1bebfa commit 990ed04
Show file tree
Hide file tree
Showing 26 changed files with 1,534 additions and 60 deletions.
4 changes: 4 additions & 0 deletions src/assets/icons/ic_email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/ic_facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/ic_kakao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/img_instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/Header/Desktop/DesktopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ const menuTitleUnderline = css`
width: 100%;
border-bottom: 2px solid white;
}
&:last-child {
&::after {
width: calc(100% + 40px);
}
}
`;

export const MenuTitle = styled.div<MenuTitleProps>`
Expand Down
6 changes: 3 additions & 3 deletions src/components/Header/menuTapList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const menuTapList: MenuTapList = [
href: '/sponsor',
},
{
type: MenuTapType.Anchor,
title: '지원하기',
href: 'https://sopt-recruiting.web.app/recruiting/apply/ob',
type: MenuTapType.Router,
title: '리크루팅',
href: '/recruit',
},
];
58 changes: 1 addition & 57 deletions src/pages/recruit.tsx
Original file line number Diff line number Diff line change
@@ -1,57 +1 @@
import styled from '@emotion/styled';
import Image from 'next/image';
import { useRouter } from 'next/router';
import Sopt404 from '@src/assets/images/sopt_404.png';
import { Header } from '@src/components';
import RoundButton from '@src/components/common/RoundButton';
import theme from '@src/styles/theme';

function Recruit() {
const router = useRouter();
const handleClick = () => {
router.push('/');
};

return (
<>
<Header />
<Styled.Root>
<Image
src={Sopt404.src}
width={296}
height={78}
alt="SOPT"
blurDataURL={Sopt404.src}
placeholder="blur"
/>
<span>아직 지원 기간이 아니에요!</span>
<RoundButton isReverse={true} onClick={handleClick}>
홈으로 가기
</RoundButton>
</Styled.Root>
</>
);
}

export default Recruit;

const Styled = {
Root: styled.section`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100vh;
& span {
margin-top: 99px;
margin-bottom: 99px;
line-height: 56px;
color: ${theme.colors.soptWhite};
font-size: 45px;
font-weight: 400;
font-style: normal;
}
`,
};
export { default } from '@src/views/RecruitPage';
1 change: 1 addition & 0 deletions src/views/FAQPage/components/faq/QuestionBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const Styled = {
`,
QuestionWrapper: styled.div<{ isOpened: boolean }>`
display: flex;
align-items: center;
justify-content: space-between;
/* align-items: center; */
margin-bottom: ${({ isOpened }) => (isOpened ? '37px' : '0')};
Expand Down
69 changes: 69 additions & 0 deletions src/views/RecruitPage/RecruitPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import styled from '@emotion/styled';
import { Footer, Header, Layout, ScrollToTopButton } from '@src/components';
import { ActivityReview } from './components/ActivityReview/ActivityReview';
import ChapterInfo from './components/ChapterInfo';
import Contact from './components/Contact';
import FaqInfo from './components/FAQ';
import NotificationSection from './components/NotificationSection';
import RecruiteeInfo from './components/RecruteeInfo';
import Schedule from './components/Schedule';

function Recruit() {
return (
<Layout>
<Header />
<ScrollToTopButton />
<Root>
<NotificationSection />
<ContentWrapper>
<RecruiteeInfo />
<ChapterInfo />
<Schedule />
<FaqInfo />
<Contact />
<ActivityReview />
</ContentWrapper>
</Root>
<Footer />
</Layout>
);
}

const Root = styled.div`
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
margin: 0 auto;
/* 태블릿 뷰 */
@media (max-width: 1199px) and (min-width: 766px) {
margin-top: 90px;
}
/* 모바일 뷰 */
@media (max-width: 765.9px) {
margin-top: 90px;
}
`;

const ContentWrapper = styled.div`
display: flex;
flex-direction: column;
gap: 180px;
width: 1200px;
padding: 100px 0;
/* 태블릿 뷰 */
@media (max-width: 1199px) and (min-width: 766px) {
width: 700px;
gap: 120px;
}
/* 모바일 뷰 */
@media (max-width: 765.9px) {
width: 360px;
gap: 80px;
}
`;

export default Recruit;
70 changes: 70 additions & 0 deletions src/views/RecruitPage/components/ActivityReview/ActivityReview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import Link from 'next/link';
import { ReactComponent as ArrowLeft } from '@src/views/MainPage/assets/arrow-left-28x28.svg';
import { ReactComponent as ArrowRight } from '@src/views/MainPage/assets/arrow-right-28x28.svg';
import ArrowRightWhite from '@src/views/MainPage/assets/arrow_right_white.svg';
import { useHorizontalScroll } from '@src/views/MainPage/lib';
import { SectionTitle } from '../common/styles';
import useFetch from './hooks/useFetch';
import {
Arrow,
ArrowWrapper,
CardTitle,
CardWrapper,
ContainerWrapper,
Content,
ContentWrapper,
Desc,
DescName,
DescWrapper,
MoreLinkWrapper,
TitleWrapper,
} from './styles';
import { parsePartToKorean } from './utils/parsePartToKorean';

export function ActivityReview() {
const reviews = useFetch();
const {
scrollableRef,
onClickLeftButton,
onClickRightButton,
isLeftScrollable,
isRightScrollable,
} = useHorizontalScroll(1032, 1);

if (reviews._TAG !== 'OK') return null;

return (
<ContainerWrapper>
<TitleWrapper>
<SectionTitle>{'회원들의 후기로 SOPT\n 활동을 미리 만나보세요.'}</SectionTitle>
<Link href="/review">
<MoreLinkWrapper>활동후기 더보기</MoreLinkWrapper>
</Link>
</TitleWrapper>
<ContentWrapper>
<ArrowWrapper onClick={() => onClickLeftButton(scrollableRef.current)}>
<ArrowLeft stroke={isLeftScrollable ? 'white' : 'grey'} />
</ArrowWrapper>
<Content ref={scrollableRef}>
{reviews.data.map((review) => (
<Link key={review.id} href={review.link}>
<CardWrapper role="presentation">
<CardTitle>{review.title}</CardTitle>
<DescWrapper>
<Desc>
{parsePartToKorean(review.part)}파트 {review.semester}{'\n'}
<DescName>{review.reviewer}</DescName>
</Desc>
<Arrow src={ArrowRightWhite} alt="" />
</DescWrapper>
</CardWrapper>
</Link>
))}
</Content>
<ArrowWrapper onClick={() => onClickRightButton(scrollableRef.current)}>
<ArrowRight stroke={isRightScrollable ? 'white' : 'grey'} />
</ArrowWrapper>
</ContentWrapper>
</ContainerWrapper>
);
}
14 changes: 14 additions & 0 deletions src/views/RecruitPage/components/ActivityReview/hooks/useFetch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useCallback } from 'react';
import useFetchBase from '@src/hooks/useFetchBase';
import { api } from '@src/lib/api';

const useFetch = () => {
const willFetch = useCallback(async () => {
const data = await api.reviewAPI.getSampleReviews();
return data.reviews;
}, []);
const state = useFetchBase(willFetch);
return state;
};

export default useFetch;
Loading

0 comments on commit 990ed04

Please sign in to comment.