mirror of https://github.com/buster-so/buster.git
version pass through
This commit is contained in:
parent
a29e6463cf
commit
7c52250b06
|
@ -43,7 +43,7 @@ export const useGetDashboard = <TData = GetDashboardResponse>(
|
|||
...dashboardQueryKeys.dashboardGetDashboard(id, 'LATEST'),
|
||||
queryFn: () =>
|
||||
queryFn({ id, version_number: 'LATEST', shouldInitializeMetrics: true, password }),
|
||||
enabled: false,
|
||||
enabled: true,
|
||||
retry(_failureCount, error) {
|
||||
if (error?.message !== undefined) {
|
||||
setProtectedAssetPasswordError({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ClientOnly } from '@tanstack/react-router';
|
||||
import type React from 'react';
|
||||
import { DashboardVersionModal } from '@/components/features/versionHistory/DashboardVersionModal';
|
||||
import { useIsDashboardReadOnly } from '@/context/Dashboards/useIsDashboardReadOnly';
|
||||
import { AssetContainer } from '../AssetContainer';
|
||||
import { DashboardContainerHeaderSegment } from './DashboardContainerHeaderSegment';
|
||||
import { DashboardAssetContextProvider } from './DashboardContextProvider';
|
||||
|
|
|
@ -12,11 +12,11 @@ export const DashboardContainerHeaderSegment: React.FC<DashboardContainerHeaderS
|
|||
React.memo((props) => {
|
||||
const { dashboardId, dashboardVersionNumber } = props;
|
||||
|
||||
const { isFetched, isError } = useIsDashboardReadOnly({
|
||||
const { isError } = useIsDashboardReadOnly({
|
||||
dashboardId,
|
||||
});
|
||||
|
||||
if (!isFetched || isError) return null;
|
||||
if (isError) return <div />; //needed for sizing
|
||||
|
||||
return <DashboardSegments {...props} />;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue