chore(dashboard): render main layout as home page for v2 (#6823)

* chore(dashboard): render main layout as home page for v2

* chore: throw an error on store not existing
This commit is contained in:
Riqwan Thamir
2024-03-26 15:29:06 +01:00
committed by GitHub
parent a843b121cd
commit 448a30d030
7 changed files with 246 additions and 6 deletions
@@ -8,7 +8,11 @@ export const useV2Store = ({ initialData }: { initialData?: any }) => {
{ initialData }
)
const store = data.stores[0]
const store = data?.stores[0]
if (!isLoading && !isError && typeof store === "undefined") {
throw new Error("Store does not exist")
}
return { store, isLoading, isError, error }
}