refactor: organize desktop vs. mobile into separate folders

This commit is contained in:
Arjun Patel
2026-04-29 08:42:56 -07:00
parent 3d9fe67936
commit 3a11a82cd3
194 changed files with 213 additions and 213 deletions
+23
View File
@@ -0,0 +1,23 @@
import { create } from "zustand";
const AUTH_TOKEN_KEY = "auth_token";
interface SessionState {
token: string | null;
setToken: (token: string) => void;
clearToken: () => void;
}
export const useSessionStore = create<SessionState>((set) => ({
token: localStorage.getItem(AUTH_TOKEN_KEY),
setToken: (token: string) => {
localStorage.setItem(AUTH_TOKEN_KEY, token);
set({ token });
},
clearToken: () => {
localStorage.removeItem(AUTH_TOKEN_KEY);
set({ token: null });
},
}));