Skip to content

Commit

Permalink
feat(web-ui): update style of appbar for new chat page (#906)
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Book <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
johanbook and Johan Book authored Jul 20, 2024
1 parent bcb988c commit 702f300
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { ReactElement, ReactNode } from "react";
import { Link as ReactRouterLink } from "react-router-dom";

import { ArrowBack } from "@mui/icons-material";
import { Box, IconButton, Typography } from "@mui/material";

import { NavLayout } from "src/components/layout";
import { Nav } from "src/components/nav";
import { useTranslation } from "src/core/i18n";

Expand All @@ -13,11 +16,21 @@ export function CreateChatPageNav({
}: CreateChatPageNavProps): ReactElement {
const { t } = useTranslation("chat-create");

const appBarContent = (
<>
<IconButton component={ReactRouterLink} to="/chat">
<ArrowBack />

<Typography sx={{ pl: 3 }} variant="h5">
{t("header")}
</Typography>
</IconButton>
</>
);

return (
<Nav>
<NavLayout header={t("header")} linkText="Back" to="/chat">
{children}
</NavLayout>
<Nav appBarContent={appBarContent}>
<Box sx={{ px: 3, pt: 1 }}>{children}</Box>
</Nav>
);
}

0 comments on commit 702f300

Please sign in to comment.