Skip to content

Commit 702f300

Browse files
johanbookJohan Book
and
Johan Book
authored
feat(web-ui): update style of appbar for new chat page (#906)
Co-authored-by: Johan Book <{ID}+{username}@users.noreply.github.com>
1 parent bcb988c commit 702f300

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { ReactElement, ReactNode } from "react";
2+
import { Link as ReactRouterLink } from "react-router-dom";
3+
4+
import { ArrowBack } from "@mui/icons-material";
5+
import { Box, IconButton, Typography } from "@mui/material";
26

3-
import { NavLayout } from "src/components/layout";
47
import { Nav } from "src/components/nav";
58
import { useTranslation } from "src/core/i18n";
69

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

19+
const appBarContent = (
20+
<>
21+
<IconButton component={ReactRouterLink} to="/chat">
22+
<ArrowBack />
23+
24+
<Typography sx={{ pl: 3 }} variant="h5">
25+
{t("header")}
26+
</Typography>
27+
</IconButton>
28+
</>
29+
);
30+
1631
return (
17-
<Nav>
18-
<NavLayout header={t("header")} linkText="Back" to="/chat">
19-
{children}
20-
</NavLayout>
32+
<Nav appBarContent={appBarContent}>
33+
<Box sx={{ px: 3, pt: 1 }}>{children}</Box>
2134
</Nav>
2235
);
2336
}

0 commit comments

Comments
 (0)