Corrected Loading error

This commit is contained in:
2024-02-04 20:43:45 +01:00
parent fa661ff6b3
commit 22a3b8698c

View File

@@ -217,8 +217,12 @@ export const useDataStore = defineStore('data', () => {
])
async function initializeData () {
await fetchProfiles()
currentTenant.value = profiles.value.find(i => i.id === user.value.id).tenants[0].id
//console.log(user.value.id)
let profile = (await supabase.from("profiles").select().eq("id",user.value.id).single()).data
//console.log(profile)
currentTenant.value = profile.tenant//profiles.value.find(i => i.id === user.value.id).tenants[0].id
await fetchData()