import { api } from "@/trpc/server";
import React from "react";
import { DataTable } from "@/components/data-table";
import { columns } from "./columns";
import { Button } from "@/components/ui/button";

async function Page() {
  const users = await api.users.getAll();

  return (
    <>
      <div className="flex w-full items-center justify-between">
        <h1 className="text-2xl font-bold">Benutzer Manager</h1>
        <Button variant={"outline"}>Mitglied einladen</Button>
      </div>

      <DataTable columns={columns} data={users} />
    </>
  );
}

export default Page;
