show diffrent between welfare and navy to user

This commit is contained in:
2023-07-16 11:57:14 +03:30
parent e440ca83e1
commit 74acce64cc

View File

@@ -3,14 +3,25 @@ import DashboardLayouts from "@/layouts/dashboardLayouts";
import useUser from "@/lib/app/hooks/useUser";
import NavyForm from "./NavyForm";
import WelfareServicesForm from "./WelfareServicesForm";
import { Divider, Chip, Box } from "@mui/material";
import { useTranslations } from "next-intl";
const DashboardLoanRequestComponent = () => {
const { token, user } = useUser();
const t = useTranslations();
const { user } = useUser();
return (
<DashboardLayouts>
<CenterLayout>
<Box sx={{ width: "80%", my: 2 }}>
<Divider>
<Chip
label={`${t("LoanRequest.loan_request_page")} | ${
user.type_name
}`}
/>
</Divider>
</Box>
{user.type_id == 1 ? <NavyForm /> : <WelfareServicesForm />}
</CenterLayout>
</DashboardLayouts>