diff --git a/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/metrics/[metricId]/layout.tsx b/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/metrics/[metricId]/layout.tsx index 4b27b991f..bc1260c8e 100644 --- a/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/metrics/[metricId]/layout.tsx +++ b/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/metrics/[metricId]/layout.tsx @@ -1,8 +1,4 @@ -import { prefetchGetMetric } from '@/api/buster_rest/metrics'; -import { metricsQueryKeys } from '@/api/query_keys/metric'; -import { HydrationBoundaryMetricStore } from '@/context/Metrics/useOriginalMetricStore'; import { AppAssetCheckLayout } from '@/layouts/AppAssetCheckLayout'; -import { dehydrate, HydrationBoundary } from '@tanstack/react-query'; export default async function MetricLayout({ children, @@ -12,18 +8,10 @@ export default async function MetricLayout({ params: Promise<{ metricId: string }>; }) { const { metricId } = await params; - const queryClient = await prefetchGetMetric({ id: metricId }); - - const metric = queryClient.getQueryData(metricsQueryKeys.metricsGetMetric(metricId).queryKey); - // const state = queryClient.getQueryState(queryKeys.metricsGetMetric(metricId).queryKey); return ( - - - - {children} - - - + + {children} + ); } diff --git a/web/src/context/Assets/HydrationBoundaryAssetStore.tsx b/web/src/context/Assets/HydrationBoundaryAssetStore.tsx index dcc22d7d3..17896758c 100644 --- a/web/src/context/Assets/HydrationBoundaryAssetStore.tsx +++ b/web/src/context/Assets/HydrationBoundaryAssetStore.tsx @@ -25,16 +25,3 @@ export const HydrationBoundaryAssetStore: React.FC<{ return <>{children}; }; - -// export const HydrationBoundaryMetricStore: React.FC<{ -// children: React.ReactNode; -// metric?: OriginalMetricStore['originalMetrics'][string]; -// }> = ({ children, metric }) => { -// const setOriginalMetrics = useOriginalMetricStore((x) => x.setOriginalMetric); - -// useMount(() => { -// if (metric) setOriginalMetrics(metric); -// }); - -// return <>{children}; -// }; diff --git a/web/src/layouts/AppAssetCheckLayout/AppAssetCheckLayout.tsx b/web/src/layouts/AppAssetCheckLayout/AppAssetCheckLayout.tsx index b0b372ef8..264879e08 100644 --- a/web/src/layouts/AppAssetCheckLayout/AppAssetCheckLayout.tsx +++ b/web/src/layouts/AppAssetCheckLayout/AppAssetCheckLayout.tsx @@ -10,6 +10,7 @@ import { prefetchGetMetric } from '@/api/buster_rest/metrics/queryReqestsServer' import { prefetchGetDashboard } from '@/api/buster_rest/dashboards/queryServerRequests'; import { metricsQueryKeys } from '@/api/query_keys/metric'; import { dashboardQueryKeys } from '@/api/query_keys/dashboard'; +import { HydrationBoundaryAssetStore } from '@/context/Assets/HydrationBoundaryAssetStore'; export type AppAssetCheckLayoutProps = { assetId: string; @@ -53,9 +54,11 @@ export const AppAssetCheckLayout: React.FC< return ( - - {Component} - + + + {Component} + + ); };