Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-ui): update style of appbar for new chat page #906

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
}
Loading