The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix custom domain url to be used only if active
Joshen Lime734db1cc2f3
diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsxindex 673fdaebd80..0b41fdfacef 100644--- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx+++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx@@ -158,7 +158,7 @@ const ProviderForm: FC<Props> = ({ provider }) => {disabledlabel="Redirect URL"value={- customDomainData?.customDomain+ customDomainData?.customDomain?.status === 'active'? `https://${customDomainData.customDomain?.hostname}/auth/v1/callback`: `https://${ui.selectedProjectRef}.supabase.co/auth/v1/callback`}diff --git a/studio/components/layouts/StorageLayout/StorageMenu.tsx b/studio/components/layouts/StorageLayout/StorageMenu.tsxindex 1d85c34ee92..5ccbbc42bc4 100644--- a/studio/components/layouts/StorageLayout/StorageMenu.tsx+++ b/studio/components/layouts/StorageLayout/StorageMenu.tsx@@ -31,11 +31,13 @@ const StorageMenu = () => {| 'logs'const storageExplorerStore = useStorageStore()- const { data, isLoading } = useBucketsQuery({ projectRef: ref })+ const { data, isLoading, isError } = useBucketsQuery({ projectRef: ref })const { openDeleteBucketModal } = storageExplorerStore || {}const buckets = data ?? []+ console.log({ isError })+return (<><Menu type="pills" className="my-6 flex flex-grow flex-col px-5">diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.jsindex 89b977bebe1..48e9dc32bad 100644--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.js+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.js@@ -166,9 +166,10 @@ const StorageExplorer = observer(({ bucket }) => {}const onCopyUrl = (name, url) => {- const formattedUrl = customDomainData?.customDomain- ? url.replace(apiUrl, `https://${customDomainData.customDomain.hostname}`)- : url+ const formattedUrl =+ customDomainData?.customDomain.status === 'active'+ ? url.replace(apiUrl, `https://${customDomainData.customDomain.hostname}`)+ : urlcopyToClipboard(formattedUrl, () => {ui.setNotification({category: 'success',diff --git a/studio/data/storage/buckets-query.ts b/studio/data/storage/buckets-query.tsindex 530c257a52b..7913db627cb 100644--- a/studio/data/storage/buckets-query.ts+++ b/studio/data/storage/buckets-query.ts@@ -21,6 +21,8 @@ export async function getBuckets({ projectRef }: BucketsVariables, signal?: Aborif (!projectRef) throw new Error('projectRef is required')const response = await get(`${API_URL}/storage/${projectRef}/buckets`, { signal })+ throw new Error('test')+if (response.error) throw response.errorreturn response as Bucket[]}