mirror of https://github.com/buster-so/buster.git
dashboard get versions
This commit is contained in:
parent
2ea633e561
commit
294ea785d7
|
@ -30,7 +30,7 @@ const useBusterAssets = () => {
|
|||
});
|
||||
} else if (type === 'dashboard') {
|
||||
await queryClient.invalidateQueries({
|
||||
queryKey: queryKeys.dashboardGetDashboard(assetId).queryKey
|
||||
queryKey: queryKeys.dashboardGetDashboard(assetId, undefined).queryKey
|
||||
});
|
||||
} else if (type === 'collection') {
|
||||
await queryClient.invalidateQueries({
|
||||
|
|
|
@ -4,8 +4,8 @@ import { useQueryClient } from '@tanstack/react-query';
|
|||
|
||||
export const useGetDashboardMemoized = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const getDashboardMemoized = useMemoizedFn((dashboardId: string) => {
|
||||
const options = dashboardQueryKeys.dashboardGetDashboard(dashboardId);
|
||||
const getDashboardMemoized = useMemoizedFn((dashboardId: string, versionNumber?: number) => {
|
||||
const options = dashboardQueryKeys.dashboardGetDashboard(dashboardId, versionNumber);
|
||||
const data = queryClient.getQueryData(options.queryKey);
|
||||
return data;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue