Skip to content

Commit 0e1b820

Browse files
committed
feat: add logout btn to mypage
1 parent f3f769d commit 0e1b820

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sanjijikfarm/src/pages/MyPage.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useMemo, useRef, useState } from 'react';
22
import { useNavigate } from 'react-router-dom';
33

4+
import { logout } from '@/api/axios/auth';
45
import { useAuthStore } from '@/api/axios/store';
56
import { getPresignedUrl, saveUserProfileImage, updateUserProfileImage, uploadImageToS3 } from '@/api/profile/profile';
67
import ArrowIcon from '@/assets/icons/right-arrow.svg';
@@ -53,7 +54,7 @@ export default function MyPage() {
5354
];
5455

5556
return (
56-
<div className="flex flex-col items-center px-5 pt-10">
57+
<div className="relative flex flex-col items-center px-5 pt-10">
5758
<div className="flex w-full flex-col items-center border-b border-gray-200 pb-10">
5859
<div className="relative mb-3 h-16 w-16">
5960
{profileImageUrl ? (
@@ -94,6 +95,12 @@ export default function MyPage() {
9495
</button>
9596
))}
9697
</div>
98+
99+
<div className="text-body-2 text-gray-4 border-gray-3 absolute top-2 right-2 flex justify-end border-b font-semibold">
100+
<button className="cursor-pointer" onClick={logout}>
101+
로그아웃
102+
</button>
103+
</div>
97104
</div>
98105
);
99106
}

0 commit comments

Comments
 (0)