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
+32 -26

No files matched your search

+27 -11
View File
@@ -50,33 +50,49 @@ 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>
<Divider
color={theme.palette.accent.main}
sx={{
position: "sticky",
top: theme.spacing(33),
backdropFilter: "blur(10px)",
}}
/>
<Stack <Stack
direction="row" direction="row"
alignItems="center" alignItems="center"
gap={theme.spacing(4)} 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> <Typography>{t("logsPage.logLevelSelect.title")}</Typography>
<Select <Select
items={LOG_LEVELS} items={LOG_LEVELS}
value={logLevel} value={logLevel}
onChange={(e) => setLogLevel(e.target.value)} onChange={(e) => {
setLogLevel(e.target.value);
}}
/> />
</Stack> </Stack>
</Stack>
<Box <Box
component="pre" component="pre"
+5 -15
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} />
<Stack
gap={theme.spacing(10)}
sx={{
position: "sticky",
top: 0,
zIndex: 1000,
backgroundColor: theme.palette.primary.main,
paddingY: theme.spacing(2),
}}
>
<Tabs <Tabs
value={value} value={value}
onChange={handleChange} onChange={handleChange}
sx={{
position: "sticky",
top: theme.spacing(0),
backdropFilter: "blur(10px)",
}}
> >
<Tab label={t("logsPage.tabs.logs")} /> <Tab label={t("logsPage.tabs.logs")} />
<Tab label={t("logsPage.tabs.queue")} /> <Tab label={t("logsPage.tabs.queue")} />
<Tab label={t("logsPage.tabs.diagnostics")} /> <Tab label={t("logsPage.tabs.diagnostics")} />
</Tabs> </Tabs>
</Stack>
{/* Main content */}
{value === 0 && <LogsComponent />} {value === 0 && <LogsComponent />}
{value === 1 && <Queue />} {value === 1 && <Queue />}
{value === 2 && <Diagnostics />} {value === 2 && <Diagnostics />}