gcx/frontend/admin-web/src/lib/auth-context.tsx

19 lines
614 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
/**
* auth-context.tsx — 向下兼容层
*
* Auth 状态已迁移至 Zustand storesrc/store/zustand/auth.store.ts
* 此文件保留 AuthProvider 和 useAuth 导出,确保现有页面无需修改。
*
* 新代码应直接从 @/store/zustand/auth.store 引入 useAuth / useAuthStore。
*/
import React from 'react';
export { useAuth, useAuthStore } from '@/store/zustand/auth.store';
/** @deprecated 无需 ProviderZustand 自管理状态。保留仅为向下兼容。 */
export function AuthProvider({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}