The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: show loading state when apikeys is empty
phamhieu7b4e1d2de455
diff --git a/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx b/studio/components/ui/ProjectSettings/DisplayApiSettings.tsxindex 8f59b791745..249b9f3c34d 100644--- a/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx+++ b/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx@@ -26,10 +26,12 @@ const DisplayApiSettings = () => {// Get the API serviceconst apiService = (services ?? []).find((x: any) => x.app.id == DEFAULT_API_SERVICE_ID)const apiKeys = apiService?.service_api_keys ?? []+ // api keys should not be empty. However it can be populated with a delay on project creation+ const isApikeysEmpty = apiKeys.length === 0return (<ApiContentWrapper>- {isProjectSettingsLoading || isJwtSecretUpdateStatusLoading ? (+ {isProjectSettingsLoading || isJwtSecretUpdateStatusLoading || isApikeysEmpty ? (<SettingsLoadingStateisError={isProjectSettingsError || isJwtSecretUpdateStatusError}errorMessage="Failed to fetch API keys"