interaction with back

This commit is contained in:
2023-07-15 16:25:32 +03:30
parent ff110ad532
commit f2568ff74e
8 changed files with 342 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
import DashboardMachinaryOfficeComponent from "@/components/dashboard/machinary-office";
import TitlePage from "@/core/components/TitlePage";
import WithAuthMiddleware from "@/middlewares/WithAuth";
import { parse } from "next-useragent";
export default function PassengerOffice() {
return (
<WithAuthMiddleware>
<TitlePage text="Dashboard.machinary_office_page" />
<DashboardMachinaryOfficeComponent />
</WithAuthMiddleware>
);
}
export async function getServerSideProps({ req, locale }) {
const { isBot } = parse(req.headers["user-agent"]);
return {
props: {
messages: (await import(`&/locales/${locale}/app.json`)).default,
isBot,
},
};
}