composables moved to app/
This commit is contained in:
parent
44d7a0f87a
commit
389939a55c
1 changed files with 0 additions and 0 deletions
|
|
@ -1,15 +0,0 @@
|
|||
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 }
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue