fix broken publish button

This commit is contained in:
Nate Kelley 2025-03-20 12:03:00 -06:00
parent ce738df0c1
commit fd6b6a6b2b
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 11 additions and 4 deletions

View File

@ -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]);

View File

@ -25,10 +25,15 @@ export const EditorContainerSubHeader: React.FC<{
return (
<div
className={cn(
'bg-disabled h-[36px] w-full border-b',
'bg-page-background h-[36px] w-full border-b',
'flex items-center justify-between px-4'
)}>
<AppSegmented options={options} value={selectedApp} onChange={onSegmentedChange} />
<AppSegmented
options={options}
type="button"
value={selectedApp}
onChange={onSegmentedChange}
/>
</div>
);
});

View File

@ -64,7 +64,7 @@ export const EditorContent: React.FC<{
return (
<div className="flex h-full w-full flex-col overflow-hidden" ref={ref}>
<EditorContainerSubHeader selectedApp={selectedApp} setSelectedApp={setSelectedApp} />
<div className={cn('h-full w-full overflow-hidden p-5', 'bg-item-hover')}>
<div className={cn('bg-page-background h-full w-full overflow-hidden p-5')}>
{selectedApp === EditorApps.PREVIEW && (
<AppVerticalCodeSplitter
autoSaveId="dataset-editor"

View File

@ -9,7 +9,7 @@ export const buttonTypeClasses = {
'bg-background border hover:bg-item-hover disabled:bg-disabled disabled:text-gray-light active:bg-item-active data-[selected=true]:bg-item-select',
black: 'bg-black text-white hover:bg-foreground-hover disabled:bg-black/60',
primary:
'bg-primary text-white hover:bg-primary-light active:bg-primary-dark data-[selected=true]:bg-primary-dark',
'bg-primary disabled:bg-disabled text-white hover:bg-primary-light disabled:text-gray-light active:bg-primary-dark data-[selected=true]:bg-primary-dark',
ghost:
'bg-transparent text-gray-dark shadow-none hover:bg-item-hover hover:text-foreground disabled:bg-transparent disabled:text-gray-light active:bg-item-active data-[selected=true]:bg-item-select',
link: 'bg-transparent text-gray-dark shadow-none hover:text-foreground disabled:bg-transparent disabled:text-gray-light',