27 lines
822 B
JavaScript
27 lines
822 B
JavaScript
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
|
import {parse} from "next-useragent";
|
|
import UserTypeMiddleware from "@/middlewares/UserType";
|
|
import LoanRequestComponent from "@/components/dashboard/refahi/add-request-loan";
|
|
|
|
const user_type = 2;
|
|
export default function AddLoanRequest() {
|
|
return (
|
|
<WithAuthMiddleware>
|
|
<UserTypeMiddleware user_type={user_type}>
|
|
<LoanRequestComponent/>
|
|
</UserTypeMiddleware>
|
|
</WithAuthMiddleware>
|
|
);
|
|
}
|
|
|
|
export async function getServerSideProps({req, locale}) {
|
|
const {isBot} = parse(req.headers["user-agent"]);
|
|
return {
|
|
props: {
|
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
|
title: "LoanRequest.loan_request_page",
|
|
isBot,
|
|
},
|
|
};
|
|
}
|