import Main from "@/src/components/pages/admin/users/add-user";
import { _n } from "@/src/exports/client-exports";
import defaultAdminProps from "@/src/functions/pages/admin/default-admin-props";
import Layout from "@/src/layouts/admin";
import { GetServerSideProps } from "next";

export default function AdminAddDeploymentUser() {
    return (
        <Layout>
            <Main />
        </Layout>
    );
}

export const getServerSideProps: GetServerSideProps = async (ctx) => {
    return await defaultAdminProps({
        ctx,
        async propsFn({ user, props, query }) {
            if (!user.super_admin) {
                return `/admin`;
            }

            return {};
        },
    });
};
