Skip to content

Commit 0b63cad

Browse files
committed
chore(frontend): remove unnecessary nesting
1 parent 7cfa5e5 commit 0b63cad

File tree

1 file changed

+39
-41
lines changed

1 file changed

+39
-41
lines changed

apps/frontend/app/routes/_dashboard.tsx

+39-41
Original file line numberDiff line numberDiff line change
@@ -523,51 +523,49 @@ export default function Layout() {
523523
links={loaderData.settingsLinks}
524524
/>
525525
</Box>
526-
<Stack gap="xs">
527-
<Flex direction="column" justify="center" gap="md">
528-
<Form
529-
method="POST"
530-
action={withQuery("/actions", { intent: "toggleColorScheme" })}
531-
onSubmit={submit}
532-
>
533-
<Group justify="center">
534-
<UnstyledButton
535-
aria-label="Toggle theme"
536-
className={classes.control2}
537-
type="submit"
538-
>
539-
<Center className={classes.iconWrapper}>
540-
<Icon size={16.8} stroke={1.5} />
541-
</Center>
542-
<Text size="sm" className={classes.value}>
543-
{upperFirst(
544-
loaderData.currentColorScheme === "dark"
545-
? "light"
546-
: "dark",
547-
)}{" "}
548-
theme
549-
</Text>
550-
</UnstyledButton>
551-
</Group>
552-
</Form>
553-
<Form
554-
method="POST"
555-
style={{ display: "flex" }}
556-
action={withQuery("/actions", { intent: "logout" })}
557-
>
526+
<Flex direction="column" justify="center" gap="md">
527+
<Form
528+
method="POST"
529+
action={withQuery("/actions", { intent: "toggleColorScheme" })}
530+
onSubmit={submit}
531+
>
532+
<Group justify="center">
558533
<UnstyledButton
559-
mx="auto"
560-
className={classes.oldLink}
534+
aria-label="Toggle theme"
535+
className={classes.control2}
561536
type="submit"
562537
>
563-
<Group>
564-
<IconLogout size={19.2} />
565-
<Text>Logout</Text>
566-
</Group>
538+
<Center className={classes.iconWrapper}>
539+
<Icon size={16.8} stroke={1.5} />
540+
</Center>
541+
<Text size="sm" className={classes.value}>
542+
{upperFirst(
543+
loaderData.currentColorScheme === "dark"
544+
? "light"
545+
: "dark",
546+
)}{" "}
547+
theme
548+
</Text>
567549
</UnstyledButton>
568-
</Form>
569-
</Flex>
570-
</Stack>
550+
</Group>
551+
</Form>
552+
<Form
553+
method="POST"
554+
style={{ display: "flex" }}
555+
action={withQuery("/actions", { intent: "logout" })}
556+
>
557+
<UnstyledButton
558+
mx="auto"
559+
className={classes.oldLink}
560+
type="submit"
561+
>
562+
<Group>
563+
<IconLogout size={19.2} />
564+
<Text>Logout</Text>
565+
</Group>
566+
</UnstyledButton>
567+
</Form>
568+
</Flex>
571569
</AppShell.Navbar>
572570
<Flex direction="column" h="90%">
573571
<Flex justify="space-between" p="md" hiddenFrom="sm">

0 commit comments

Comments
 (0)