import LoanRequestComponent from "@/components/dashboard/navgan/add-request-loan";
import {globalServerProps} from "@/core/utils/globalServerProps";
import DeadlineMiddleware from "@/middlewares/Deadline";

export default function AddLoanRequest() {
    return (<DeadlineMiddleware type={'register'} withMessage={true}>
        <LoanRequestComponent/>
    </DeadlineMiddleware>);
}

export async function getServerSideProps({req, locale}) {
    return {
        props: {
            ...await globalServerProps({req, locale}),
            title: "LoanRequest.loan_request_page",
            layout: {name: 'DashboardLayout', props: {permissions: ["can_request_navgan_loan"]}}
        },
    };
}
