-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
온보딩 페이지 UI #7
온보딩 페이지 UI #7
Changes from all commits
bf595e9
5384d03
df19494
bb59acd
857100e
f5332aa
f12515c
2282911
38ed403
ec50124
1742a98
85a0cae
c823b2e
9297712
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ node_modules | |
|
||
|
||
localhost+1-key.pem | ||
localhost+1.pem | ||
localhost+1.pem | ||
*.pem |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { GET } from '@/network'; | ||
|
||
export const getInterestList = async () => { | ||
const data = await GET('/interests'); | ||
return data.data; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
import ServiceIcon from '@/assets/icons/ServiceIcon'; | ||
import EmailListInteraction from '@/components/Onboard/EmailListInteraction'; | ||
|
||
interface EmailListProps { | ||
userName: string; | ||
} | ||
|
||
const EmailList = async ({ userName = '채현' }: EmailListProps) => { | ||
const incomingSenders = await getIncomingSenders(); | ||
const incomingSenders2 = await getIncomingSenders2(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 일단 목데이터라서 네이밍을 1 2로 지은건가요!? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 맞습니다 :) 해당 부분은 api 연결하면서 모두 싹다 바뀔것같아서 일단 data holding용입니다 |
||
return ( | ||
<div className='flex flex-col items-center gap-10 mb-24'> | ||
<span className='flex flex-col items-center gap-2'> | ||
<span className='flex flex-row items-center'> | ||
<ServiceIcon width={195} /> | ||
<span className='text-black text-h1'>에서 골라 볼 뉴스레터를 선택하세요</span> | ||
</span> | ||
<span className='text-body3'>골라 볼 뉴스레터 목록은 언제든 수정할 수 있어요.</span> | ||
</span> | ||
|
||
<EmailListInteraction | ||
userName={userName} | ||
interest={'IT/테크'} | ||
incomingSenders={incomingSenders} | ||
techSenders={incomingSenders2} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EmailList; | ||
|
||
const getIncomingSenders = async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 목데이터라서 이후에 api 호출 코드 들어갈거라서 async로 미리 선언해둔건가요!? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 요기도 실제 api연결하려고 했다가 백엔드 배포가 아직 안됐다는걸 깨닫고 함수 body만 갈아끼웠어서 async만 남아있는것 같네요! |
||
const response = { | ||
senders: [ | ||
{ | ||
senderId: 'randomString1', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub1', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString2', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub2', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString3', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub3', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString4', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub4', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString5', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub5', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
], | ||
count: 5, | ||
}; | ||
|
||
return response; | ||
}; | ||
|
||
const getIncomingSenders2 = async () => { | ||
const response = { | ||
senders: [ | ||
{ | ||
senderId: 'randomString1', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub11', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString2', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub12', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString3', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub13', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString4', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub14', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString5', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub15', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString6', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub16', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString7', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub17', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString8', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub18', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString9', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub19', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
{ | ||
senderId: 'randomString10', | ||
fullAddress: '[email protected]', | ||
localPart: 'inspomailclub20', | ||
domain: 'hedwig.com', | ||
category: 'IT / 테크', | ||
}, | ||
], | ||
count: 10, | ||
}; | ||
|
||
return response; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { OnboardButton } from '@/components/OnboardButton'; | ||
import { getInterestList } from '@/api/onboard'; | ||
import InterestInteraction from '@/components/Onboard/InterestInteraction'; | ||
|
||
interface InterestProps { | ||
userName: string; | ||
} | ||
|
||
const Interest = async ({ userName = '채현' }: InterestProps) => { | ||
const interestList = await getInterest(); | ||
return ( | ||
<div className='flex flex-col items-center justify-start w-full h-full gap-10'> | ||
<span className='flex flex-col items-center gap-2'> | ||
<h1 className='text-black text-h1'>{userName}님, 관심 있는 분야를 선택해주세요</h1> | ||
<div className='text-body3'>맞춤형 인사이트 제공을 위해 ‘1개 이상’ 선택해주세요.</div> | ||
</span> | ||
|
||
<InterestInteraction interestList={interestList} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Interest; | ||
|
||
const getInterest = async () => { | ||
const interestList = [ | ||
{ | ||
id: 'randomstring1', | ||
interest: '시사', | ||
desc: '세상 돌아가는', | ||
}, | ||
{ | ||
id: 'randomstring2', | ||
interest: 'IT/테크', | ||
desc: '최신 테크', | ||
}, | ||
{ | ||
id: 'randomstring3', | ||
interest: '디자인', | ||
desc: '디자인 영감', | ||
}, | ||
{ | ||
id: 'randomstring4', | ||
interest: '경제', | ||
desc: '핵심 기업', | ||
}, | ||
{ | ||
id: 'randomstring5', | ||
interest: '트렌드', | ||
desc: '글로벌 트렌드', | ||
}, | ||
{ | ||
id: 'randomstring6', | ||
interest: '채용', | ||
desc: '신규 채용', | ||
}, | ||
]; | ||
return interestList; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Metadata } from 'next'; | ||
import MSWComponent from '@/mocks/MSWWrapper'; | ||
import '@/styles/tailwind.css'; | ||
import { Header } from '@/components/Header'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Inspo Mail Club', | ||
description: 'TODO: FIX DESCRIPTION', | ||
}; | ||
|
||
export default function OnBoardLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<MSWComponent> | ||
<Header isMain={false} /> | ||
<div className='flex justify-center w-full h-full mt-12'>{children}</div> | ||
</MSWComponent> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import ServiceIcon from '@/assets/icons/ServiceIcon'; | ||
import Carousel from '@/components/Carousel/Carousel'; | ||
import Image from 'next/image'; | ||
import GoogleIcon from '@/assets/icons/GoogleIcon.png'; | ||
import Link from 'next/link'; | ||
|
||
const OnBoard = () => { | ||
const BLUR_DATA_URL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mOcUg8AAa0BFSX8uBwAAAAASUVORK5CYII='; | ||
return ( | ||
<div className='flex flex-col items-center gap-10'> | ||
<span className='flex flex-col items-center'> | ||
<span className='flex flex-row items-center'> | ||
<ServiceIcon width={195} /> | ||
<span className='text-black text-h1'>은 관리되지 않는 메일함 속에서</span> | ||
</span> | ||
<span className='text-black text-h1'>방치되는 유익한 메일을 큐레이팅해요</span> | ||
</span> | ||
{/* <Carousel width={690} height={400} length={3}> | ||
<Carousel.Wrapper> | ||
<Carousel.Item index={0}> | ||
<img src='https://via.placeholder.com/690x400' alt='carousel1' /> | ||
</Carousel.Item> | ||
<Carousel.Item index={1}> | ||
<img src='https://via.placeholder.com/690x400' alt='carousel2' /> | ||
</Carousel.Item> | ||
<Carousel.Item index={2}> | ||
<img src='https://via.placeholder.com/690x400' alt='carousel3' /> | ||
</Carousel.Item> | ||
</Carousel.Wrapper> | ||
<Carousel.Dots imageLength={3} /> | ||
<Carousel.Move direction='prev' /> | ||
<Carousel.Move direction='next' /> | ||
</Carousel> */} | ||
<Image | ||
placeholder='blur' | ||
blurDataURL='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFklEQVR42mN8//HLfwYiAOOoQvoqBABbWyZJf74GZgAAAABJRU5ErkJggg==' | ||
src='http://via.placeholder.com/690x400' | ||
alt='carousel' | ||
width={690} | ||
height={400} | ||
/> | ||
<Link href='/onboard/interest'> | ||
<Image | ||
className='cursor-pointer' | ||
placeholder='blur' | ||
src={GoogleIcon} | ||
alt='google login' | ||
width={350} | ||
height={64} | ||
/> | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
export default OnBoard; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
userName optional 아니다보니 default값 안넣어줘도 될듯요!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분이 원래는 api를 통해 userData를 받아와야하는 부분인데, api의 연결 이슈로 인해 일단 UI를 보여주기 위해 넣어놓았어요! API 연결하면서 해당 부분을 수정하도록 할게요!