Implemented navbar

This commit is contained in:
Florian Sylvain
2022-12-23 23:41:34 +01:00
parent 17b41cc232
commit 1f1c7914a8
9 changed files with 136 additions and 15 deletions
+9 -4
View File
@@ -10,11 +10,16 @@ export interface jwtFormat {
}
export const useAuthStore = defineStore("AuthStore", () => {
const expire = ref("")
const token = ref("")
const expire = ref('')
const token = ref('')
function clearAll(): void {
expire.value = ''
token.value = ''
}
function isSet(): boolean {
return token.value !== undefined && token.value !== ""
return token.value !== undefined && token.value !== ''
}
function isExpired(): boolean {
@@ -43,5 +48,5 @@ export const useAuthStore = defineStore("AuthStore", () => {
initStore()
return { expire, token, isValid }
return { expire, token, isValid, clearAll }
})