From 0950bda26517d9acb1ebbffdf97031f2bf6118da Mon Sep 17 00:00:00 2001 From: sunhwaaRj Date: Sun, 29 Mar 2026 13:51:27 +0900 Subject: [PATCH 1/5] =?UTF-8?q?#162=20[CHORE]=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B2=84=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/LoginSocialList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 (
From 303d98a5796599eb8af64788397cde3359484a56 Mon Sep 17 00:00:00 2001 From: sunhwaaRj Date: Sun, 29 Mar 2026 13:54:17 +0900 Subject: [PATCH 2/5] =?UTF-8?q?#162=20[CHORE]=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B8=B0=EB=8A=A5=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(main)/project/[id]/_components/ProjectInfo.tsx | 3 ++- src/components/recruit/editor/TextContent.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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/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: 이미지 업로드 버튼 복구 */} + {/* */} From d72e01e82bc71f9d3c47fb64953d5ae23a1a2810 Mon Sep 17 00:00:00 2001 From: sunhwaaRj Date: Sun, 29 Mar 2026 14:07:26 +0900 Subject: [PATCH 3/5] =?UTF-8?q?#162=20[FEAT]=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=8B=9C=20=EA=B2=BD=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Header.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 85cef86e..683d67a5 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -42,10 +42,18 @@ const Header = () => { setIsProfileDropdownOpen((prev) => !prev); }; + const PROTECTED_PATH = [/^\/mypage/, /^\/project\/[^/]+(\/|$)/]; + const handleLogout = () => { useUserStore.getState().clearUser(); setIsProfileDropdownOpen(false); + setIsMenuOpen(false); addToast({ message: '로그아웃 완료되었습니다.' }); + + const isProtected = PROTECTED_PATH.some((pattern) => pattern.test(pathname)); + if (isProtected) { + router.push('/'); + } }; return ( From 2f31c289f6f2137104724050b04004761a39986e Mon Sep 17 00:00:00 2001 From: sunhwaaRj Date: Sun, 29 Mar 2026 14:08:35 +0900 Subject: [PATCH 4/5] =?UTF-8?q?#162=20[CHORE]=20=ED=8C=80=ED=94=BC?= =?UTF-8?q?=EC=85=9C=EB=A1=9D=20=ED=95=98=EB=8B=A8=20=EB=B0=94=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(main)/teampsylog/_components/BottomComment.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ( <>
{/* 바텀 시트 */}
Date: Sun, 29 Mar 2026 14:40:54 +0900 Subject: [PATCH 5/5] =?UTF-8?q?#162=20[FEAT]=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20api=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Header.tsx | 21 +++++++++++++-------- src/libs/api/auth.ts | 11 +++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 src/libs/api/auth.ts diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 683d67a5..fdc64a6f 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -9,6 +9,7 @@ import clsx from 'clsx'; import { useToast } from '@/contexts/ToastContext'; import { isLoggedIn as checkIsLoggedIn } from '@/utils/auth'; import Footer from './Footer'; +import { logout } from '@/libs/api/auth'; const Header = () => { const { userName, _hasHydrated } = useUserStore(); @@ -44,15 +45,19 @@ const Header = () => { const PROTECTED_PATH = [/^\/mypage/, /^\/project\/[^/]+(\/|$)/]; - const handleLogout = () => { - useUserStore.getState().clearUser(); - setIsProfileDropdownOpen(false); - setIsMenuOpen(false); - addToast({ message: '로그아웃 완료되었습니다.' }); + 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('/'); + const isProtected = PROTECTED_PATH.some((pattern) => pattern.test(pathname)); + if (isProtected) router.push('/'); } }; 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; +}