This commit is contained in:
Joshen Lim committed 2023-07-02 12:33:54 +08:00
1 parent d6bd0dd3a7
commit 7bf03f8da8
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { useQuery, useQueryClient, UseQueryOptions } from '@tanstack/react-query'
import { get } from 'lib/common/fetch'
import { API_URL, IS_PLATFORM } from 'lib/constants'
import { API_URL } from 'lib/constants'
import { useCallback } from 'react'
import { storageKeys } from './keys'
@@ -35,7 +35,7 @@ export const useBucketsQuery = <TData = BucketsData>(
useQuery<BucketsData, BucketsError, TData>(
storageKeys.buckets(projectRef),
({ signal }) => getBuckets({ projectRef }, signal),
{ enabled: IS_PLATFORM && enabled && typeof projectRef !== 'undefined', ...options }
{ enabled: enabled && typeof projectRef !== 'undefined', ...options }
)
export const useBucketsPrefetch = ({ projectRef }: BucketsVariables) => {
+1 -1
View File
@@ -58,7 +58,7 @@ export const ProfileProvider = ({ children }: PropsWithChildren<{}>) => {
},
})
const { isLoading: isLoadingPermissions } = usePermissionsQuery()
const { isInitialLoading: isLoadingPermissions } = usePermissionsQuery()
const value = useMemo(() => {
const isLoading = isLoadingProfile || isCreatingProfile || isLoadingPermissions