🐛 Bug fixes on undefined cookies
This commit is contained in:
parent
6a73ac85a0
commit
f52d9b6052
@ -50,9 +50,9 @@ const avatar = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function signOut() {
|
function signOut() {
|
||||||
useCookie("__hydrogen_atk", { watch: "shallow" }).value = null
|
useAtk().value = null
|
||||||
useCookie("__hydrogen_rtk", { watch: "shallow" }).value = null
|
useRtk().value = null
|
||||||
id.userinfo = null
|
id.userinfo.value = null
|
||||||
reloadNuxtApp()
|
reloadNuxtApp()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,11 +3,11 @@ import { ref } from "vue"
|
|||||||
import { solarFetch } from "~/utils/request"
|
import { solarFetch } from "~/utils/request"
|
||||||
|
|
||||||
export function useAtk() {
|
export function useAtk() {
|
||||||
return useCookie("__hydrogen_atk", { watch: "shallow", maxAge: 31556952000 })
|
return useCookie("__hydrogen_atk", { path: "/", maxAge: 31556952000 })
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useRtk() {
|
export function useRtk() {
|
||||||
return useCookie("__hydrogen_rtk", { watch: "shallow", maxAge: 31556952000 })
|
return useCookie("__hydrogen_rtk", { path: "/", maxAge: 31556952000 })
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useLoggedInState() {
|
export function useLoggedInState() {
|
||||||
|
Loading…
Reference in New Issue
Block a user