-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1bebfa
commit 990ed04
Showing
26 changed files
with
1,534 additions
and
60 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
70
src/views/RecruitPage/components/ActivityReview/ActivityReview.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
src/views/RecruitPage/components/ActivityReview/hooks/useFetch.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.