This commit is contained in:
Nate Kelley 2025-04-16 13:08:50 -06:00
parent 7f7ddbe097
commit 33a119f29b
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 6 additions and 1 deletions

View File

@ -77,6 +77,7 @@ export const useListVersionHistories = ({
metricId: assetId
})
);
onCloseVersionHistory();
}
}
if (type === 'dashboard') {
@ -88,6 +89,7 @@ export const useListVersionHistories = ({
dashboardId: assetId
})
);
onCloseVersionHistory();
}
}

View File

@ -60,6 +60,7 @@ export const useAppLayout = () => {
// Start the navigation
push(targetPath);
console.log('pushed', targetPath);
// Start checking for path changes
checkPathChange();

View File

@ -23,7 +23,7 @@ export const VersionHistoryHeaderButtons: React.FC<{}> = ({}) => {
const onClickRestoreVersionPreflight = useMemoizedFn(async () => {
if (selectedQueryVersion) {
await onClickRestoreVersion(selectedQueryVersion, true);
await onClickRestoreVersion(selectedQueryVersion);
}
});

View File

@ -7,6 +7,7 @@ import { useMemo } from 'react';
export const useCloseVersionHistory = () => {
const onChangePage = useAppLayoutContextSelector((x) => x.onChangePage);
const closeSecondaryView = useChatLayoutContextSelector((x) => x.closeSecondaryView);
const chatId = useChatLayoutContextSelector((x) => x.chatId);
const metricId = useChatLayoutContextSelector((x) => x.metricId);
const dashboardId = useChatLayoutContextSelector((x) => x.dashboardId);
@ -36,6 +37,7 @@ export const useCloseVersionHistory = () => {
const onCloseVersionHistory = useMemoizedFn(() => {
onChangePage(href);
closeSecondaryView();
});
return { href, onCloseVersionHistory };