From 7bf03f8da8f02c0af518f90c5e00a98dba87b957 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Sun, 2 Jul 2023 12:33:54 +0800 Subject: [PATCH] bring fixes from https://github.com/supabase/supabase/pull/15504 --- studio/data/storage/buckets-query.ts | 4 ++-- studio/lib/profile.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/studio/data/storage/buckets-query.ts b/studio/data/storage/buckets-query.ts index 530c257a52b..793254c8340 100644 --- a/studio/data/storage/buckets-query.ts +++ b/studio/data/storage/buckets-query.ts @@ -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 = ( useQuery( 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) => { diff --git a/studio/lib/profile.tsx b/studio/lib/profile.tsx index 6e9ae6a7ce1..18f91d45900 100644 --- a/studio/lib/profile.tsx +++ b/studio/lib/profile.tsx @@ -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