add usename and position in sidebar

This commit is contained in:
2023-08-06 14:22:58 +03:30
parent 5e9f977030
commit 9e5f5ec7ce

View File

@@ -1,8 +1,10 @@
import {Divider, Stack, Toolbar, Typography} from "@mui/material";
import {useTranslations} from "next-intl";
import SidebarList from "./SidebarList";
import useUser from "@/lib/app/hooks/useUser";
const SidebarDrawer = ({handleDrawerToggle}) => {
const {user} = useUser()
const t = useTranslations();
return (
<>
@@ -12,10 +14,7 @@ const SidebarDrawer = ({handleDrawerToggle}) => {
{t("app_short_name")}
</Typography>
<Typography variant="caption">
{
t("expert") /* make if on thease t("user_welfare_services")
t("user_navy") */
}
{user.name} | {user.position}
</Typography>
</Stack>
</Toolbar>