import {parse} from "next-useragent";
import DashboardLoanHistoryComponent from "@/components/dashboard/loan-history";

export default function LoanHistory() {
    return (
        <DashboardLoanHistoryComponent/>
    );
}

export async function getServerSideProps({req, locale}) {
    const {isBot} = parse(req.headers["user-agent"]);
    return {
        props: {
            messages: (await import(`&/locales/${locale}/app.json`)).default,
            title: "Dashboard.loan_history",
            isBot,
            locale,
            layout: {name: 'DashboardLayout', props: {permissions: ["view_navgan_loans", "view_navgan_loans_province"]}}
        },
    };
}
