feat: route structure, providers, layouts, and placeholder pages
This commit is contained in:
@@ -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" }),
|
||||
}))
|
||||
Reference in New Issue
Block a user