Made NavBar Still

This commit is contained in:
singh-kanwarpreet committed 2025-08-13 14:47:09 +05:30
1 parent f2e2d5c2ed
commit 480ba034ce
1 file changed
+34 -13
+34 -13
View File
@@ -23,21 +23,42 @@ const Logs = () => {
}; };
const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }]; const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }];
// Height of the header (Breadcrumbs + Tabs)
const HEADER_HEIGHT = theme.spacing(25);
return ( return (
<Stack gap={theme.spacing(20)}> <>
<Breadcrumbs list={BREADCRUMBS} /> <Stack
<Tabs gap={theme.spacing(20)}
value={value} sx={{
onChange={handleChange} position: "sticky",
top: 0,
left: 0,
right: 0,
zIndex: 1000,
backgroundColor: theme.palette.primary.main,
paddingY: theme.spacing(2),
}}
> >
<Tab label={t("logsPage.tabs.logs")} /> <Breadcrumbs list={BREADCRUMBS} />
<Tab label={t("logsPage.tabs.queue")} /> <Tabs
<Tab label={t("logsPage.tabs.diagnostics")} /> value={value}
</Tabs> onChange={handleChange}
{value === 0 && <LogsComponent />} >
{value === 1 && <Queue />} <Tab label={t("logsPage.tabs.logs")} />
{value === 2 && <Diagnostics />} <Tab label={t("logsPage.tabs.queue")} />
</Stack> <Tab label={t("logsPage.tabs.diagnostics")} />
</Tabs>
</Stack>
{/* Main content below fixed header */}
<Stack sx={{ paddingTop: HEADER_HEIGHT }}>
{value === 0 && <LogsComponent />}
{value === 1 && <Queue />}
{value === 2 && <Diagnostics />}
</Stack>
</>
); );
}; };