From f8a38907911d940cb2e8e6c9aa49488d05b2b578 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 7 Nov 2025 19:13:57 +0900
Subject: (김준회) 헤더 심플 로그아웃 콜백 URL 변경 (멀티도메인 대응)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/layout/HeaderSimple.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'components/layout/HeaderSimple.tsx')

diff --git a/components/layout/HeaderSimple.tsx b/components/layout/HeaderSimple.tsx
index 425bf796..82eebf2e 100644
--- a/components/layout/HeaderSimple.tsx
+++ b/components/layout/HeaderSimple.tsx
@@ -29,14 +29,17 @@ import Image from "next/image";
 import { mainNav, additionalNav, MenuSection, MenuItem, mainNavVendor, additionalNavVendor } from "@/config/menuConfig"; // 메뉴 구성 임포트
 import { MobileMenu } from "./MobileMenu";
 import { CommandMenu } from "./command-menu";
-import { useSession, signOut } from "next-auth/react";
+import { useSession } from "next-auth/react";
+import { customSignOut } from "@/lib/auth/custom-signout";
 import GroupedMenuRenderer from "./GroupedMenuRender";
+import { useTranslation } from '@/i18n/client';
 
 export function HeaderSimple() {
     const params = useParams();
     const lng = params?.lng as string;
     const pathname = usePathname();
     const { data: session } = useSession();
+    const { t } = useTranslation(lng, 'menu');
 
     const userName = session?.user?.name || ""; 
     const domain = session?.user?.domain || ""; 
@@ -149,7 +152,7 @@ export function HeaderSimple() {
                                         <Link href={`${basePath}/settings`}>Settings</Link>
                                     </DropdownMenuItem>
                                     <DropdownMenuSeparator />
-                                    <DropdownMenuItem onSelect={() => signOut({ callbackUrl: `/${lng}/${domain}` })}>
+                                    <DropdownMenuItem onSelect={() => customSignOut({ callbackUrl: `${window.location.origin}${basePath}` })}>
                                         Logout
                                     </DropdownMenuItem>
                                 </DropdownMenuContent>
@@ -159,7 +162,7 @@ export function HeaderSimple() {
                 </div>
 
                 {/* 모바일 메뉴 */}
-                {isMobileMenuOpen && <MobileMenu lng={lng} onClose={toggleMobileMenu} />}
+                {isMobileMenuOpen && <MobileMenu lng={lng} onClose={toggleMobileMenu} t={t} />}
             </header>
         </>
     );
-- 
cgit v1.2.3

