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

export default function Register() {
    return (
        <WithoutAuthMiddleware>
            <RegisterComponent/>
        </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_page",
            isBot,
        },
    };
}
