import { Fragment, useContext } from "react";
import { AppContext } from "@/src/pages/_app";
import Divider from "@/twui/components/layout/Divider";
import AdminHero from "@/src/components/general/admin/hero";
import Button from "@/twui/components/layout/Button";
import UsersList from "./(sections)/users-list";

export default function Main() {
    const { pageProps } = useContext(AppContext);

    return (
        <Fragment>
            <AdminHero
                title={`Users`}
                description={<>All Users in this deployment</>}
                ctas={
                    <>
                        <Button title="Add User" href={`/admin/users/add-user`}>
                            Add User
                        </Button>
                    </>
                }
            />
            <Divider />
            <UsersList />
        </Fragment>
    );
}
