Improved code quality

This commit is contained in:
singh-kanwarpreet committed 2025-08-14 15:02:44 +05:30
1 parent 13a5f699ba
commit ce667bc53b
2 files changed
+46 -40

No files matched your search

+37 -21
View File
@@ -50,32 +50,48 @@ const Logs = () => {
{ _id: "debug", name: t("logsPage.logLevelSelect.values.debug") }, { _id: "debug", name: t("logsPage.logLevelSelect.values.debug") },
]; ];
return ( return (
<Stack gap={theme.spacing(8)}> <Stack gap={theme.spacing(4)}>
<Stack <Box
gap={theme.spacing(8)}
sx={{ sx={{
position: "sticky", position: "sticky",
top: theme.spacing(19), top: theme.spacing(17),
zIndex: 950, backdropFilter: "blur(10px)",
backgroundColor: theme.palette.primary.main, paddingY: theme.spacing(5),
paddingY: theme.spacing(7), paddingLeft: theme.spacing(6),
paddingX: theme.spacing(7),
}} }}
> >
<Typography variant="h2">{t("logsPage.description")}</Typography> <Typography variant="h2">{t("logsPage.description")}</Typography>
<Divider color={theme.palette.accent.main} /> </Box>
<Stack <Divider
direction="row" color={theme.palette.accent.main}
alignItems="center" sx={{
gap={theme.spacing(4)} position: "sticky",
> top: theme.spacing(33),
<Typography>{t("logsPage.logLevelSelect.title")}</Typography> backdropFilter: "blur(10px)",
<Select }}
items={LOG_LEVELS} />
value={logLevel}
onChange={(e) => setLogLevel(e.target.value)} <Stack
/> direction="row"
</Stack> alignItems="center"
gap={theme.spacing(4)}
mt={theme.spacing(10)}
sx={{
position: "sticky",
top: theme.spacing(34),
backdropFilter: "blur(10px)",
paddingTop: theme.spacing(4),
paddingLeft: theme.spacing(6),
}}
>
<Typography>{t("logsPage.logLevelSelect.title")}</Typography>
<Select
items={LOG_LEVELS}
value={logLevel}
onChange={(e) => {
setLogLevel(e.target.value);
}}
/>
</Stack> </Stack>
<Box <Box
+9 -19
View File
@@ -23,32 +23,22 @@ const Logs = () => {
}; };
const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }]; const BREADCRUMBS = [{ name: t("logsPage.title"), path: "/logs" }];
return ( return (
<Stack gap={theme.spacing(20)}> <Stack gap={theme.spacing(20)}>
<Breadcrumbs list={BREADCRUMBS} /> <Breadcrumbs list={BREADCRUMBS} />
<Tabs
<Stack value={value}
gap={theme.spacing(10)} onChange={handleChange}
sx={{ sx={{
position: "sticky", position: "sticky",
top: 0, top: theme.spacing(0),
zIndex: 1000, backdropFilter: "blur(10px)",
backgroundColor: theme.palette.primary.main,
paddingY: theme.spacing(2),
}} }}
> >
<Tabs <Tab label={t("logsPage.tabs.logs")} />
value={value} <Tab label={t("logsPage.tabs.queue")} />
onChange={handleChange} <Tab label={t("logsPage.tabs.diagnostics")} />
> </Tabs>
<Tab label={t("logsPage.tabs.logs")} />
<Tab label={t("logsPage.tabs.queue")} />
<Tab label={t("logsPage.tabs.diagnostics")} />
</Tabs>
</Stack>
{/* Main content */}
{value === 0 && <LogsComponent />} {value === 0 && <LogsComponent />}
{value === 1 && <Queue />} {value === 1 && <Queue />}
{value === 2 && <Diagnostics />} {value === 2 && <Diagnostics />}