From fcdcb5ee743ecae878cb6ca8bc8436c14c17870f Mon Sep 17 00:00:00 2001 From: Jordi Enric Date: Tue, 7 Apr 2026 12:37:25 +0200 Subject: [PATCH] chore(studio): drop unrelated changes from pr Co-Authored-By: Claude Opus 4.6 Made-with: Cursor --- .../components/grid/SupabaseGrid.utils.ts | 5 +- .../Home/ProjectList/ProjectCard.tsx | 4 +- .../ui/NanoInstanceUpgradeBanner.tsx | 48 ------------------- 3 files changed, 6 insertions(+), 51 deletions(-) delete mode 100644 apps/studio/components/ui/NanoInstanceUpgradeBanner.tsx diff --git a/apps/studio/components/grid/SupabaseGrid.utils.ts b/apps/studio/components/grid/SupabaseGrid.utils.ts index 29ee3501381..ed98ffaef1b 100644 --- a/apps/studio/components/grid/SupabaseGrid.utils.ts +++ b/apps/studio/components/grid/SupabaseGrid.utils.ts @@ -12,6 +12,7 @@ import type { Sort, SupaColumn, SupaTable } from './types' import { formatClipboardValue } from './utils/common' import type { Filter, SavedState, SupaRow } from '@/components/grid/types' import { Entity, isTableLike } from '@/data/table-editor/table-editor-types' +import { BASE_PATH } from '@/lib/constants' import { QueuedOperation, QueuedOperationType } from '@/state/table-editor-operation-queue.types' export function formatSortURLParams(tableName: string, sort?: string[]): Sort[] { @@ -158,7 +159,7 @@ export function buildTableEditorUrl({ tableId: number schema?: string }) { - const url = new URL(`/project/${projectRef}/editor/${tableId}`, location.origin) + const url = new URL(`${BASE_PATH}/project/${projectRef}/editor/${tableId}`, location.origin) // If the schema is provided, add it to the URL so that the left sidebar is opened to the correct schema if (schema) { @@ -172,7 +173,7 @@ export function buildTableEditorUrl({ if (savedState?.filters && savedState.filters.length > 0) { savedState.filters?.forEach((filter) => url.searchParams.append('filter', filter)) } - return url.pathname + url.search + return url.toString() } export function saveTableEditorStateToLocalStorage({ diff --git a/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx b/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx index f41e5ac68e6..9aac1a022f1 100644 --- a/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx +++ b/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx @@ -145,7 +145,9 @@ export const ProjectCard = ({ } - footer={} + footer={ + + } containerElement={} /> diff --git a/apps/studio/components/ui/NanoInstanceUpgradeBanner.tsx b/apps/studio/components/ui/NanoInstanceUpgradeBanner.tsx deleted file mode 100644 index cca0a4ef002..00000000000 --- a/apps/studio/components/ui/NanoInstanceUpgradeBanner.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { useParams } from 'common' -import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' -import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' -import { Zap } from 'lucide-react' -import Link from 'next/link' -import { useRouter } from 'next/router' -import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Button, cn } from 'ui' - -export const NanoInstanceUpgradeBanner = () => { - const { ref } = useParams() - const router = useRouter() - - const { data: org } = useSelectedOrganizationQuery() - const { data: project } = useSelectedProjectQuery() - - const isOnNano = project?.infra_compute_size === 'nano' - const isOnPaidPlan = org?.plan?.id !== undefined && org.plan.id !== 'free' - const isOnComputeSettingsPage = router.pathname.endsWith('/settings/compute-and-disk') - - if (!isOnNano || !isOnPaidPlan || isOnComputeSettingsPage) { - return null - } - - return ( - svg]:left-6 px-6 [&>svg]:w-[26px] [&>svg]:h-[26px]' - )} - > - -
- Free upgrade to Micro compute available - - Your project is on a Nano instance which has limited resources. This can cause backups to - fail, connection timeouts, and slow performance. Micro compute is included in your plan at - no additional cost. - -
-
- -
-
- ) -}