初始化项目

This commit is contained in:
wmp
2025-09-13 14:00:56 +08:00
commit f1fa28401e
61 changed files with 4710 additions and 0 deletions

19
src/store/auth.ts Normal file
View File

@@ -0,0 +1,19 @@
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
interface AuthState {
isAuthenticated: boolean
setAuth: (state: boolean) => void
}
export const useAuthStore = create<AuthState>()(
persist(
(set) => ({
isAuthenticated: false,
setAuth: (state) => set({ isAuthenticated: state }),
}),
{
name: 'auth-storage',
}
)
)