-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: ๐ค add images * refactor: ๐ก remove unused images * feat: ๐ธ implement landing * feat: ๐ธ implement useLogin * feat: ๐ธ connect signin, signup route * refactor: ๐ก remove export
- Loading branch information
1 parent
cc5c205
commit 986868d
Showing
11 changed files
with
142 additions
and
43 deletions.
There are no files selected for viewing
Binary file not shown.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
interface IndicatorProps { | ||
activeIndex: number; | ||
length: number; | ||
} | ||
|
||
interface DotProps { | ||
isActive: boolean; | ||
} | ||
|
||
const Dot = ({ isActive }: DotProps) => { | ||
const color = isActive ? '#1B1717' : '#E8E8E8'; | ||
return ( | ||
<svg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'> | ||
<circle cx='5.24023' cy='5.90771' r='5' fill={color} /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export const Indicator = ({ activeIndex, length }: IndicatorProps) => { | ||
const renderDots = (length: number, activeIndex: number) => { | ||
const dots = []; | ||
for (let i = 0; i < length; i++) { | ||
dots.push(<Dot key={i} isActive={activeIndex === i} />); | ||
} | ||
|
||
return dots; | ||
}; | ||
return ( | ||
<div className='tw-flex tw-flex-row tw-justify-center tw-py-10'> | ||
<div className='tw-flex tw-flex-row tw-gap-3'>{renderDots(length, activeIndex)}</div> | ||
</div> | ||
); | ||
}; |
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,13 @@ | ||
import { useEffect, useState } from 'react'; | ||
|
||
export function useLogin() { | ||
const [login, setLogin] = useState(false); | ||
useEffect(() => { | ||
const user_id = localStorage.getItem('user_id'); | ||
if (user_id) { | ||
setLogin(true); | ||
} | ||
}, []); | ||
|
||
return { login }; | ||
} |
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,48 +1,54 @@ | ||
import { Icon } from '@/components/shared'; | ||
import { useRouter } from 'next/router'; | ||
import { useState } from 'react'; | ||
import { Indicator } from '@/components/landing/Indicator'; | ||
import { Button } from '@/components/shared/Button'; | ||
import { TextButton } from '@/components/shared/TextButton'; | ||
import { ItemsSlide } from '@/components/user/item/ItemsSlide'; | ||
|
||
// NOTE : ์จ๋ณด๋ฉ ํ์ด์ง | ||
const items = [ | ||
{ | ||
id: 1, | ||
title: '', | ||
image: '/images/onboarding1.png', | ||
description: '', | ||
}, | ||
{ | ||
id: 2, | ||
title: '', | ||
image: '/images/onboarding2.png', | ||
description: '', | ||
}, | ||
{ | ||
id: 3, | ||
title: '', | ||
image: '/images/onboarding3.png', | ||
description: '', | ||
}, | ||
]; | ||
export default function Home() { | ||
const [activeIndex, setActiveIndex] = useState<number>(1); | ||
const router = useRouter(); | ||
|
||
return ( | ||
<main> | ||
<p className='tw-text-main-headline'>์ด๊ฑด ๋ฉ์ธ ํค๋๋ผ์ธ์ด์์ Pretendard</p> | ||
<p className='tw-text-sub-headline'>์ด๊ฑด ์๋ธ ํค๋๋ผ์ธ์ด์์ Pretendard</p> | ||
<p className='tw-text-body1'>์ด๊ฑด ๋ณธ๋ฌธ1์ด์์ Pretendard</p> | ||
<p className='tw-text-body2'>์ด๊ฑด ๋ณธ๋ฌธ2์ด์์ Pretendard</p> | ||
<p className='tw-text-caption'>์ด๊ฑด ์บก์ ์ด์์ Pretendard</p> | ||
<p className='tw-text-button1'>์ด๊ฑด ๋ฒํผ1์ด์์ Pretendard</p> | ||
<p className='tw-text-button2'>์ด๊ฑด ๋ฒํผ2์ด์์ Pretendard</p> | ||
<p className='tw-text-accent-eng'>Montserrat accent</p> | ||
<p className='tw-text-body-eng'>Montserrat body</p> | ||
<p className='tw-text-caption-eng'>Montserrat caption</p> | ||
<Icon iconType='Edit' /> | ||
<Icon iconType='Menu' /> | ||
<Icon iconType='Plus' /> | ||
<Icon iconType='RightArrow' /> | ||
<Button variant='primary' onClick={() => console.log('primary')}> | ||
Primary | ||
</Button> | ||
<Button variant='secondary' onClick={() => console.log('secondary')} disabled> | ||
Secondary | ||
</Button> | ||
<Button variant='nudge' onClick={() => console.log('nudge')}> | ||
๊ทธ๋ผํผ ์์๋ณด๊ธฐ | ||
<Icon iconType='RightChevron' /> | ||
</Button> | ||
<Button variant='link' onClick={() => console.log('link')} className='tw-w-[20rem]'> | ||
Link | ||
<Icon iconType='RightArrow' /> | ||
</Button> | ||
<Button variant='rounded' onClick={() => console.log('rounded')}> | ||
ADD | ||
</Button> | ||
<TextButton color='primary' onClick={() => console.log('textbutton1')}> | ||
์ ์ฅ | ||
</TextButton> | ||
<TextButton color='secondary' onClick={() => console.log('textbutton2')}> | ||
์ ์ฅ | ||
</TextButton> | ||
</main> | ||
<section> | ||
<Indicator length={items.length} activeIndex={activeIndex} /> | ||
<ItemsSlide items={items} activeIndex={activeIndex} setActiveIndex={setActiveIndex} /> | ||
<div className='tw-fixed tw-bottom-3 tw-flex tw-w-full tw-max-w-[475px] tw-flex-col tw-items-center tw-gap-3 tw-px-5'> | ||
<Button | ||
className='tw-flex tw-h-[50px] tw-w-full tw-flex-row tw-justify-center tw-rounded-[6px]' | ||
variant='primary' | ||
onClick={() => router.push('/signin')} | ||
> | ||
๋ก๊ทธ์ธํ๊ธฐ | ||
</Button> | ||
<Button | ||
className='tw-flex tw-h-[50px] tw-w-full tw-flex-row tw-justify-center tw-rounded-[6px] tw-bg-yellow' | ||
variant='primary' | ||
onClick={() => router.push('/signup')} | ||
> | ||
ํ์๊ฐ์ ํ๊ธฐ | ||
</Button> | ||
</div> | ||
</section> | ||
); | ||
} |
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,48 @@ | ||
import { Icon } from '@/components/shared'; | ||
import { Button } from '@/components/shared/Button'; | ||
import { TextButton } from '@/components/shared/TextButton'; | ||
|
||
// NOTE : ์จ๋ณด๋ฉ ํ์ด์ง | ||
export default function Sample() { | ||
return ( | ||
<main> | ||
<p className='tw-text-main-headline'>์ด๊ฑด ๋ฉ์ธ ํค๋๋ผ์ธ์ด์์ Pretendard</p> | ||
<p className='tw-text-sub-headline'>์ด๊ฑด ์๋ธ ํค๋๋ผ์ธ์ด์์ Pretendard</p> | ||
<p className='tw-text-body1'>์ด๊ฑด ๋ณธ๋ฌธ1์ด์์ Pretendard</p> | ||
<p className='tw-text-body2'>์ด๊ฑด ๋ณธ๋ฌธ2์ด์์ Pretendard</p> | ||
<p className='tw-text-caption'>์ด๊ฑด ์บก์ ์ด์์ Pretendard</p> | ||
<p className='tw-text-button1'>์ด๊ฑด ๋ฒํผ1์ด์์ Pretendard</p> | ||
<p className='tw-text-button2'>์ด๊ฑด ๋ฒํผ2์ด์์ Pretendard</p> | ||
<p className='tw-text-accent-eng'>Montserrat accent</p> | ||
<p className='tw-text-body-eng'>Montserrat body</p> | ||
<p className='tw-text-caption-eng'>Montserrat caption</p> | ||
<Icon iconType='Edit' /> | ||
<Icon iconType='Menu' /> | ||
<Icon iconType='Plus' /> | ||
<Icon iconType='RightArrow' /> | ||
<Button variant='primary' onClick={() => console.log('primary')}> | ||
Primary | ||
</Button> | ||
<Button variant='secondary' onClick={() => console.log('secondary')} disabled> | ||
Secondary | ||
</Button> | ||
<Button variant='nudge' onClick={() => console.log('nudge')}> | ||
๊ทธ๋ผํผ ์์๋ณด๊ธฐ | ||
<Icon iconType='RightChevron' /> | ||
</Button> | ||
<Button variant='link' onClick={() => console.log('link')} className='tw-w-[20rem]'> | ||
Link | ||
<Icon iconType='RightArrow' /> | ||
</Button> | ||
<Button variant='rounded' onClick={() => console.log('rounded')}> | ||
ADD | ||
</Button> | ||
<TextButton color='primary' onClick={() => console.log('textbutton1')}> | ||
์ ์ฅ | ||
</TextButton> | ||
<TextButton color='secondary' onClick={() => console.log('textbutton2')}> | ||
์ ์ฅ | ||
</TextButton> | ||
</main> | ||
); | ||
} |
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