2025-11-23 16:10:27 +09:00
|
|
|
'use client';
|
|
|
|
|
|
2026-02-23 17:17:13 +09:00
|
|
|
/**
|
|
|
|
|
* AuthContext - 하위호환 re-export 심
|
|
|
|
|
*
|
|
|
|
|
* 실제 구현은 src/stores/authStore.ts (Zustand)로 이동됨.
|
|
|
|
|
* 기존 import { useAuth } from '@/contexts/AuthContext' 코드가
|
|
|
|
|
* 깨지지 않도록 타입과 훅을 re-export.
|
|
|
|
|
*/
|
2025-11-23 16:10:27 +09:00
|
|
|
|
2026-02-23 17:17:13 +09:00
|
|
|
import { type ReactNode } from 'react';
|
|
|
|
|
import { useAuthStore } from '@/stores/authStore';
|
2025-11-23 16:10:27 +09:00
|
|
|
|
2026-02-23 17:17:13 +09:00
|
|
|
// 타입 re-export
|
|
|
|
|
export type { Tenant, Role, MenuItem, User, UserRole } from '@/stores/authStore';
|
2025-11-23 16:10:27 +09:00
|
|
|
|
2026-02-23 17:17:13 +09:00
|
|
|
// AuthProvider: 빈 passthrough (미발견 import 안전망)
|
2025-11-23 16:10:27 +09:00
|
|
|
export function AuthProvider({ children }: { children: ReactNode }) {
|
2026-02-23 17:17:13 +09:00
|
|
|
return <>{children}</>;
|
2025-11-23 16:10:27 +09:00
|
|
|
}
|
|
|
|
|
|
2026-02-23 17:17:13 +09:00
|
|
|
// useAuth: authStore 전체 상태를 반환 (기존 Context 인터페이스 유지)
|
2025-11-23 16:10:27 +09:00
|
|
|
export function useAuth() {
|
2026-02-23 17:17:13 +09:00
|
|
|
return useAuthStore();
|
2025-11-23 16:10:27 +09:00
|
|
|
}
|