Skip to content

Commit e400810

Browse files
committed
Move dashboard provider
1 parent 7d163fd commit e400810

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

site/src/app.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { GlobalSnackbar } from "./components/GlobalSnackbar/GlobalSnackbar"
1010
import { dark } from "./theme"
1111
import "./theme/globalFonts"
1212
import { ProxyProvider } from "contexts/ProxyContext"
13+
import { DashboardProvider } from "components/Dashboard/DashboardProvider"
1314

1415
const queryClient = new QueryClient({
1516
defaultOptions: {
@@ -30,10 +31,12 @@ export const AppProviders: FC<PropsWithChildren> = ({ children }) => {
3031
<ErrorBoundary>
3132
<QueryClientProvider client={queryClient}>
3233
<AuthProvider>
33-
<ProxyProvider>
34-
{children}
35-
<GlobalSnackbar />
36-
</ProxyProvider>
34+
<DashboardProvider>
35+
<ProxyProvider>
36+
{children}
37+
<GlobalSnackbar />
38+
</ProxyProvider>
39+
</DashboardProvider>
3740
</AuthProvider>
3841
</QueryClientProvider>
3942
</ErrorBoundary>

site/src/components/Dashboard/DashboardLayout.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { Outlet } from "react-router-dom"
1313
import { dashboardContentBottomPadding } from "theme/constants"
1414
import { updateCheckMachine } from "xServices/updateCheck/updateCheckXService"
1515
import { Navbar } from "../Navbar/Navbar"
16-
import { DashboardProvider } from "./DashboardProvider"
1716

1817
export const DashboardLayout: FC = () => {
1918
const styles = useStyles()
@@ -26,7 +25,7 @@ export const DashboardLayout: FC = () => {
2625
const { error: updateCheckError, updateCheck } = updateCheckState.context
2726

2827
return (
29-
<DashboardProvider>
28+
<>
3029
<ServiceBanner />
3130
<LicenseBanner />
3231

@@ -55,7 +54,7 @@ export const DashboardLayout: FC = () => {
5554

5655
<DeploymentBanner />
5756
</div>
58-
</DashboardProvider>
57+
</>
5958
)
6059
}
6160

0 commit comments

Comments
 (0)