MCPcopy Index your code
hub / github.com/coder/coder / DashboardLayout

Function DashboardLayout

site/src/modules/dashboard/DashboardLayout.tsx:17–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15import { useUpdateCheck } from "./useUpdateCheck";
16
17export const DashboardLayout: FC = () => {
18 const { permissions } = useAuthenticated();
19 const updateCheck = useUpdateCheck(permissions.viewDeploymentConfig);
20 const canViewDeployment = Boolean(permissions.viewDeploymentConfig);
21
22 return (
23 <>
24 {canViewDeployment && <LicenseBanner />}
25 <AnnouncementBanners />
26
27 <div className="flex flex-col min-h-screen justify-between">
28 {/* biome-ignore lint/a11y/useValidAnchor: Skip links use fragment anchors by design. */}
29 <a
30 href="#main-content"
31 onClick={(e) => {
32 e.preventDefault();
33 const main = document.getElementById("main-content");
34 main?.focus();
35 }}
36 className="sr-only focus-visible:not-sr-only focus-visible:absolute focus-visible:z-50 focus-visible:p-4 focus-visible:bg-surface-primary focus-visible:text-content-primary"
37 >
38 Skip to main content
39 </a>
40 <Navbar />
41
42 <main
43 id="main-content"
44 tabIndex={-1}
45 className={cn(
46 "relative flex flex-col flex-1 min-h-0 overflow-y-auto",
47 "focus:outline-none",
48 )}
49 >
50 <Suspense fallback={<Loader />}>
51 <Outlet />
52 </Suspense>
53 </main>
54
55 <DeploymentBanner />
56
57 <Snackbar
58 data-testid="update-check-snackbar"
59 open={updateCheck.isVisible}
60 anchorOrigin={{
61 vertical: "bottom",
62 horizontal: "right",
63 }}
64 ContentProps={{
65 sx: (theme) => ({
66 background: theme.palette.background.paper,
67 color: theme.palette.text.primary,
68 maxWidth: 440,
69 flexDirection: "row",
70 borderColor: theme.palette.info.light,
71
72 "& .MuiSnackbarContent-message": {
73 flex: 1,
74 },

Callers

nothing calls this directly

Calls 4

useAuthenticatedFunction · 0.90
useUpdateCheckFunction · 0.90
cnFunction · 0.90
docsFunction · 0.90

Tested by

no test coverage detected