From 4100321c3e04f7ea44690b48c2df61633982531f Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Thu, 7 Sep 2023 17:03:18 +1000 Subject: [PATCH] address feedback --- .../TableEditor/HeaderTitle.tsx | 6 ++-- .../TableEditor/TableEditor.tsx | 6 +--- .../TableGridEditor/TableGridEditor.tsx | 2 +- studio/data/database/schemas-query.ts | 28 +++++++++++-------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx index 81e4bb4566c..9c71dcce12c 100644 --- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx +++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/HeaderTitle.tsx @@ -2,7 +2,7 @@ import type { PostgresTable } from '@supabase/postgres-meta' interface HeaderTitleProps { schema: string - table: PostgresTable + table?: { name: string } isDuplicating: boolean } @@ -17,13 +17,13 @@ const HeaderTitle = ({ schema, table, isDuplicating }: HeaderTitleProps) => { if (isDuplicating) { return ( <> - Duplicate table {table.name} + Duplicate table {table?.name} ) } return ( <> - Update table {table.name} + Update table {table?.name} ) } diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx index 72262f47ec3..dd97c467436 100644 --- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx +++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx @@ -170,11 +170,7 @@ const TableEditor = ({ key="TableEditor" visible={visible} header={ - + } className={`transition-all duration-100 ease-in ${isImportingSpreadsheet ? ' mr-32' : ''}`} onCancel={closePanel} diff --git a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx index 323c337ad90..79565b1d54e 100644 --- a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx +++ b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx @@ -411,7 +411,7 @@ const TableGridEditor = ({ {(isViewSelected || isTableSelected) && } - {!isUndefined(snap.selectedSchemaName) && ( + {snap.selectedSchemaName !== undefined && ( >