diff --git a/src/app/(main)/project/[id]/_components/ProjectInfo.tsx b/src/app/(main)/project/[id]/_components/ProjectInfo.tsx index 7cf55a2b..90926dbf 100644 --- a/src/app/(main)/project/[id]/_components/ProjectInfo.tsx +++ b/src/app/(main)/project/[id]/_components/ProjectInfo.tsx @@ -30,7 +30,8 @@ const ProjectInfo = ({ id }: { id: string }) => {
- + {/* TODO: 프로젝트 이미지 부분 복구 */} + {/* */}
diff --git a/src/app/(main)/teampsylog/_components/BottomComment.tsx b/src/app/(main)/teampsylog/_components/BottomComment.tsx index 30c05628..251ae9d1 100644 --- a/src/app/(main)/teampsylog/_components/BottomComment.tsx +++ b/src/app/(main)/teampsylog/_components/BottomComment.tsx @@ -27,16 +27,17 @@ const BottomComment = ({ isOpen, onClose, children }: BottomSheetProps) => { return ( <>
{/* 바텀 시트 */}
{ const { userName, _hasHydrated } = useUserStore(); @@ -42,10 +43,22 @@ const Header = () => { setIsProfileDropdownOpen((prev) => !prev); }; - const handleLogout = () => { - useUserStore.getState().clearUser(); - setIsProfileDropdownOpen(false); - addToast({ message: '로그아웃 완료되었습니다.' }); + const PROTECTED_PATH = [/^\/mypage/, /^\/project\/[^/]+(\/|$)/]; + + const handleLogout = async () => { + try { + await logout(); + } catch (e) { + console.error('logout api failed', e); + } finally { + useUserStore.getState().clearUser(); + setIsProfileDropdownOpen(false); + setIsMenuOpen(false); + addToast({ message: '로그아웃 완료되었습니다.' }); + + const isProtected = PROTECTED_PATH.some((pattern) => pattern.test(pathname)); + if (isProtected) router.push('/'); + } }; return ( diff --git a/src/components/login/LoginSocialList.tsx b/src/components/login/LoginSocialList.tsx index 45e4cfe5..e0cd7357 100644 --- a/src/components/login/LoginSocialList.tsx +++ b/src/components/login/LoginSocialList.tsx @@ -72,7 +72,7 @@ export default function LoginSocialList() { }, []); // 고정된 순서: 네이버, 카카오, 구글 - const fixedOrder: SocialType[] = ['naver', 'kakao', 'google']; + const fixedOrder: SocialType[] = ['kakao', 'google']; return (
diff --git a/src/components/recruit/editor/TextContent.tsx b/src/components/recruit/editor/TextContent.tsx index 0ccab893..bb001934 100644 --- a/src/components/recruit/editor/TextContent.tsx +++ b/src/components/recruit/editor/TextContent.tsx @@ -90,7 +90,8 @@ const TextContent = ({ control, name = 'content', initialImages }: Props) => {

{textLength}

- + {/* TODO: 이미지 업로드 버튼 복구 */} + {/* */}
diff --git a/src/libs/api/auth.ts b/src/libs/api/auth.ts new file mode 100644 index 00000000..f2f807a1 --- /dev/null +++ b/src/libs/api/auth.ts @@ -0,0 +1,11 @@ +import { CommonResponse } from '@/types/common'; +import api from './api'; + +export async function logout() { + const { data } = await api.post>('auth/logout'); + + if (!data.isSuccess) { + throw new Error(data.message || 'Failed to logout'); + } + return data.result; +}