The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Cleanup
Terry Sutton9ef4565821af
diff --git a/studio/hooks/misc/useUpgradePrompt.tsx b/studio/hooks/misc/useUpgradePrompt.tsxindex b201583e1e7..27781aa60a0 100644--- a/studio/hooks/misc/useUpgradePrompt.tsx+++ b/studio/hooks/misc/useUpgradePrompt.tsx@@ -6,7 +6,7 @@ import { maybeShowUpgradePrompt, TIER_QUERY_LIMITS } from 'components/interfacesimport Link from 'next/link'import { StripeProduct } from 'components/interfaces/Billing'-export const useUpgradePrompt = (from: any) => {+export const useUpgradePrompt = (from: string) => {const router = useRouter()const { ref } = router.queryconst { subscription } = useProjectSubscription(ref as string)diff --git a/studio/pages/project/[ref]/logs-explorer/index.tsx b/studio/pages/project/[ref]/logs-explorer/index.tsxindex 19d150418ac..64521c6c9c1 100644--- a/studio/pages/project/[ref]/logs-explorer/index.tsx+++ b/studio/pages/project/[ref]/logs-explorer/index.tsx@@ -45,7 +45,7 @@ export const LogsExplorerPage: NextPageWithLayout = () => {})const { UpgradePrompt, showUpgradePrompt, setShowUpgradePrompt } = useUpgradePrompt(- params.iso_timestamp_start+ params.iso_timestamp_start as string)useEffect(() => {@@ -122,9 +122,7 @@ export const LogsExplorerPage: NextPageWithLayout = () => {if (shouldShowUpgradePrompt) {setShowUpgradePrompt(!showUpgradePrompt)- }-- if (!shouldShowUpgradePrompt) {+ } else {setParams((prev) => ({...prev,iso_timestamp_start: from || '',diff --git a/studio/tests/pages/projects/logs-query.test.js b/studio/tests/pages/projects/logs-query.test.jsindex 41093ed8cb5..662f2d0a711 100644--- a/studio/tests/pages/projects/logs-query.test.js+++ b/studio/tests/pages/projects/logs-query.test.js@@ -152,8 +152,6 @@ test('datepicker interaction updates query params', async () => {},})- const { subscription } = useProjectSubscription()-if (subscription.tier.supabase_prod_id === 'tier_pro') {const router = useRouter()expect(router.push).toBeCalled()@@ -168,21 +166,19 @@ test('datepicker interaction updates query params', async () => {})test.only('Upgrade prompt displays if user on free plan and tries to view beyond 24hrs', async () => {- render(<LogsExplorerPage />)- render(<UpgradePrompt />)-- clickDropdown(await screen.findByText(/Last 24 hours/))- userEvent.click(await screen.findByText(/Last 3 days/))-useProjectSubscription.mockReturnValue({subscription: {tier: {- supabase_prod_id: 'free',+ supabase_prod_id: 'tier_free',},},})- const { subscription } = useProjectSubscription()+ render(<LogsExplorerPage />)+ render(<UpgradePrompt />)++ clickDropdown(await screen.findByText(/Last 24 hours/))+ userEvent.click(await screen.findByText(/Last 3 days/))if (subscription.tier.supabase_prod_id !== 'free') {expect(getByText('Logs can be retained up to a')).toBeInTheDocument()