Initial commit: Setup Bun, Elysia, Vite, React, TanStack Router, Mantine, and Biome
This commit is contained in:
12
src/store/auth.ts
Normal file
12
src/store/auth.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { proxy } from "valtio";
|
||||
import type { authClient } from "../utils/auth-client";
|
||||
|
||||
interface AuthState {
|
||||
user: (typeof authClient.$Infer.Session.user & { role: string }) | null;
|
||||
session: typeof authClient.$Infer.Session.session | null;
|
||||
}
|
||||
|
||||
export const authStore = proxy<AuthState>({
|
||||
user: null,
|
||||
session: null,
|
||||
});
|
||||
Reference in New Issue
Block a user