Skip to content

Commit

Permalink
#21 Feat: 로그아웃 api 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
yunseul-dev committed Dec 7, 2023
1 parent dddd1f6 commit 22db010
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/components/common/Menu.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Flex, Text, Drawer, Divider } from '@mantine/core';
import { Text, Drawer, Divider } from '@mantine/core';
import { useNavigate } from 'react-router-dom';
import MyMenu from './MyMenu';

const Menu = ({ opened, close }) => {
const navigate = useNavigate();

const handleMypageClick = () => navigate('/mypage');

return (
<Drawer.Root
opened={opened}
Expand Down Expand Up @@ -34,13 +33,7 @@ const Menu = ({ opened, close }) => {
Board
</Text>
<Divider my={20} />
<Flex gap={10} direction={'column'} py={10}>
<Text>윤 슬 회원님, 환영합니다.</Text>
<Text onClick={handleMypageClick} style={{ cursor: 'pointer' }}>
마이페이지
</Text>
<Text style={{ cursor: 'pointer' }}>로그아웃</Text>
</Flex>
<MyMenu navigate={navigate} />
</Drawer.Body>
</Drawer.Content>
</Drawer.Root>
Expand Down

0 comments on commit 22db010

Please sign in to comment.