-
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.
- Loading branch information
1 parent
a775a24
commit 2178bb4
Showing
18 changed files
with
325 additions
and
108 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.
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,7 +1,11 @@ | ||
import { Body } from '@/shared'; | ||
import { Nav } from '@/shared/components/Nav'; | ||
|
||
export const Home = () => ( | ||
<Body> | ||
<h1>home</h1> | ||
</Body> | ||
<> | ||
<Nav /> | ||
<Body> | ||
<h1>home</h1> | ||
</Body> | ||
</> | ||
); |
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,8 @@ | ||
import { Nav } from '@/shared'; | ||
|
||
export const NewNote = () => ( | ||
<> | ||
<Nav /> | ||
<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,5 @@ | ||
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
|
||
export * from './NewNote'; |
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,40 @@ | ||
import { Box } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
import { Body, styleToken, Typography } from '@/shared'; | ||
import { Nav } from '@/shared/components/Nav'; | ||
|
||
export const Trash = () => ( | ||
<> | ||
<Nav /> | ||
<Body> | ||
<Container> | ||
<Box | ||
style={{ | ||
padding: '29px 0 28px', | ||
}} | ||
> | ||
<Typography variant="h1" fontWeight={400}> | ||
휴지통 | ||
</Typography> | ||
</Box> | ||
<Box | ||
style={{ | ||
margin: 0, | ||
padding: '33px 0', | ||
borderBottom: `1px solid ${styleToken.color.gray200}`, | ||
}} | ||
> | ||
<Typography variant="subtitle1">휴지통에 저장된 항목은 1달이 지나면 자동으로 완전히 삭제됩니다.</Typography> | ||
</Box> | ||
</Container> | ||
</Body> | ||
</> | ||
); | ||
|
||
const Container = styled.div` | ||
padding-right: 44px; | ||
padding-left: 56px; | ||
height: 100%; | ||
width: 100%; | ||
max-width: 1182px; | ||
`; |
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,5 @@ | ||
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
|
||
export * from './Trash'; |
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,58 @@ | ||
import { Box } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { NavButton, NavContent, NavFooter, Navigation, PATH, Typography } from '@/shared'; | ||
|
||
export const Nav = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClickHome = () => { | ||
console.log('home'); | ||
navigate(PATH.HOME); | ||
}; | ||
|
||
const handleClickNewNote = () => { | ||
console.log('new note'); | ||
navigate(PATH.NOTE); | ||
}; | ||
|
||
const handleClickTrash = () => { | ||
console.log('trash'); | ||
navigate(PATH.TRASH); | ||
}; | ||
|
||
const handleClickSetting = () => { | ||
console.log('setting'); | ||
navigate(PATH.ACCOUNT); | ||
}; | ||
|
||
const handleClickLogout = () => { | ||
console.log('logout'); | ||
navigate(PATH.MAIN); | ||
}; | ||
|
||
return ( | ||
<Navigation> | ||
<Container> | ||
<Box | ||
onClick={handleClickHome} | ||
style={{ | ||
cursor: 'pointer', | ||
}} | ||
> | ||
<Typography variant="h2">복습할고양</Typography> | ||
</Box> | ||
<NavButton onNote={handleClickNewNote} /> | ||
<NavContent onHome={handleClickHome} onTrash={handleClickTrash} /> | ||
<NavFooter onLogout={handleClickLogout} onSetting={handleClickSetting} /> | ||
</Container> | ||
</Navigation> | ||
); | ||
}; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
flex: 1, 1; | ||
`; |
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,5 @@ | ||
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
|
||
export * from './Nav'; |
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,21 +1,43 @@ | ||
import { Flex } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
import { styleToken } from '@/shared'; | ||
|
||
export const NavButton = () => ( | ||
<Flex width="100%" flexDirection="row" justifyContent="center" alignItems="center"> | ||
<Flex | ||
width="56px" | ||
height="56px" | ||
flexDirection="row" | ||
justifyContent="center" | ||
alignItems="center" | ||
style={{ | ||
border: `1px solid ${styleToken.color.gray300}`, | ||
borderRadius: '50%', | ||
cursor: 'pointer', | ||
}} | ||
> | ||
<img src="/src/assets/note/add_memo.png" alt="새로운 노트 작성" width={30} height={30} /> | ||
</Flex> | ||
</Flex> | ||
type NavButtonProps = { | ||
onNote: () => void; | ||
}; | ||
|
||
export const NavButton = ({ onNote }: NavButtonProps) => ( | ||
<Container> | ||
<Item> | ||
<Flex | ||
width="56px" | ||
height="56px" | ||
flexDirection="row" | ||
justifyContent="center" | ||
alignItems="center" | ||
onClick={onNote} | ||
style={{ | ||
border: `1px solid ${styleToken.color.gray300}`, | ||
borderRadius: '50%', | ||
cursor: 'pointer', | ||
}} | ||
> | ||
<img src="/src/assets/note/add_memo.png" alt="새로운 노트 작성" width={25} height={25} /> | ||
</Flex> | ||
</Item> | ||
</Container> | ||
); | ||
|
||
const Container = styled.div` | ||
width: 100%; | ||
flex-basis: auto; | ||
padding: 0; | ||
margin: 19px 0 0 auto; | ||
`; | ||
|
||
const Item = styled(Flex)` | ||
width: 100%; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
`; |
Oops, something went wrong.