🔊 Add more user store logs
This commit is contained in:
@@ -15,8 +15,14 @@ export const useUserStore = defineStore("user", () => {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
async function fetchUser(reload = true) {
|
async function fetchUser(reload = true) {
|
||||||
if (isLoading.value) return
|
if (isLoading.value) {
|
||||||
if (!reload && user.value) return // Skip fetching if already loaded and not forced to
|
console.log("[UserStore] Fetch already in progress. Skipping.")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!reload && user.value) {
|
||||||
|
console.log(`[UserStore] User store was loaded with account @${user.value.name} and no reload. Skipping.`)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
error.value = null
|
error.value = null
|
||||||
|
|||||||
Reference in New Issue
Block a user