From fd6b6a6b2bf4fa0a3cfd20928b28b628c080aab3 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 20 Mar 2025 12:03:00 -0600 Subject: [PATCH] fix broken publish button --- .../[datasetId]/_DatasetsLayout/DatasetPageContext.tsx | 2 ++ .../[datasetId]/editor/EditorContainerSubHeader.tsx | 9 +++++++-- .../datasets/[datasetId]/editor/EditorContent.tsx | 2 +- web/src/components/ui/buttons/Button.tsx | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/web/src/app/app/(primary_layout)/datasets/[datasetId]/_DatasetsLayout/DatasetPageContext.tsx b/web/src/app/app/(primary_layout)/datasets/[datasetId]/_DatasetsLayout/DatasetPageContext.tsx index fd3f5a885..9067e5b0f 100644 --- a/web/src/app/app/(primary_layout)/datasets/[datasetId]/_DatasetsLayout/DatasetPageContext.tsx +++ b/web/src/app/app/(primary_layout)/datasets/[datasetId]/_DatasetsLayout/DatasetPageContext.tsx @@ -25,6 +25,8 @@ export const useDatasetPageContext = ({ datasetId }: { datasetId: string }) => { return !datasetId || !sql || !ymlFile || (originalYmlFile === ymlFile && originalSQL === sql); }, [datasetSQL, sql, datasetId, datasetYmlFile, ymlFile]); + console.log(disablePublish); + const isChangedSQL = useMemo(() => { return originalDatasetSQL !== sql; }, [originalDatasetSQL, sql]); diff --git a/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContainerSubHeader.tsx b/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContainerSubHeader.tsx index a1c5732f8..bbdc99437 100644 --- a/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContainerSubHeader.tsx +++ b/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContainerSubHeader.tsx @@ -25,10 +25,15 @@ export const EditorContainerSubHeader: React.FC<{ return (
- +
); }); diff --git a/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContent.tsx b/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContent.tsx index 79e21798b..2bf02799f 100644 --- a/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContent.tsx +++ b/web/src/app/app/(primary_layout)/datasets/[datasetId]/editor/EditorContent.tsx @@ -64,7 +64,7 @@ export const EditorContent: React.FC<{ return (
-
+
{selectedApp === EditorApps.PREVIEW && (