composables moved to app/

This commit is contained in:
Frank Agerholm 2026-01-25 11:14:03 +01:00
commit 389939a55c
No known key found for this signature in database

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 }
}