feat: route structure, providers, layouts, and placeholder pages

This commit is contained in:
zetaloop
2026-02-20 12:43:34 +08:00
parent 1f87f4676e
commit 3093da1665
35 changed files with 324 additions and 70 deletions
+19
View File
@@ -0,0 +1,19 @@
import { create } from "zustand"
export type UserRole = "consumer" | "player" | "owner"
interface AuthState {
isAuthenticated: boolean
currentRole: UserRole
switchRole: (role: UserRole) => void
login: () => void
logout: () => void
}
export const useAuthStore = create<AuthState>((set) => ({
isAuthenticated: false,
currentRole: "consumer",
switchRole: (role) => set({ currentRole: role }),
login: () => set({ isAuthenticated: true }),
logout: () => set({ isAuthenticated: false, currentRole: "consumer" }),
}))