import WithAuthMiddleware from "@/middlewares/WithAuth";
import {parse} from "next-useragent";
import UserTypeMiddleware from "@/middlewares/UserType";
import LoanFollowUpComponent from "@/components/dashboard/navgan/followUp-loan";

const user_type = 1;
export default function FollowUpLoan() {
    return (
        <WithAuthMiddleware>
            <UserTypeMiddleware user_type={user_type}>
                <LoanFollowUpComponent/>
            </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,
        },
    };
}
