import NavyComponent from "@/components/register/navy";
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
import {parse} from "next-useragent";

export default function Register() {
    return (
        <WithoutAuthMiddleware>
            <NavyComponent/>
        </WithoutAuthMiddleware>
    );
}

export async function getServerSideProps({req, locale}) {
    const {isBot} = parse(req.headers["user-agent"]);
    return {
        props: {
            messages: (await import(`&/locales/${locale}/app.json`)).default,
            title: "Titles.title_register_navy_page",
            isBot,
        },
    };
}
