first pages

This commit is contained in:
Frank Agerholm 2026-01-25 10:58:20 +01:00
commit cf983ce274
No known key found for this signature in database
3 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,15 @@
export function useAuth() {
const token = useState("token", () => null)
function setToken(t: string) {
token.value = t
localStorage.setItem("token", t)
}
function loadToken() {
token.value = localStorage.getItem("token")
}
return { token, setToken, loadToken }
}