add dynamic text to sidebar header

This commit is contained in:
2023-07-15 11:35:24 +03:30
parent d63a893d90
commit 0717e6c754

View File

@@ -1,10 +1,12 @@
import useUser from "@/lib/app/hooks/useUser";
import { Divider, Stack, Toolbar, Typography } from "@mui/material";
import { useTranslations } from "next-intl";
import SidebarList from "./SidebarList";
import StyledImage from "@/core/components/StyledImage";
const SidebarDrawer = ({ handleDrawerToggle }) => {
const { user } = useUser();
const t = useTranslations();
return (
<>
<Toolbar>
@@ -12,12 +14,7 @@ const SidebarDrawer = ({ handleDrawerToggle }) => {
<Typography variant="h6" sx={{ color: "primary.main" }}>
{t("app_short_name")}
</Typography>
<Typography variant="caption">
{
t("user_navy") /* make if on thease t("user_welfare_services")
t("user_navy") */
}
</Typography>
<Typography variant="caption">{user.type_name}</Typography>
</Stack>
</Toolbar>
<Divider />