34 lines
765 B
TypeScript
34 lines
765 B
TypeScript
import Link from 'next/link';
|
|
import { PrismaClient } from '@repo/db';
|
|
import { PaginatedTable } from '../app/_components/PaginatedTable';
|
|
|
|
export default async function Home() {
|
|
const prisma = new PrismaClient();
|
|
|
|
return (
|
|
<div>
|
|
<h1 className="text-5xl">Hub</h1>
|
|
<Link href="/logout">
|
|
<button className="btn">Logout</button>
|
|
</Link>
|
|
<PaginatedTable
|
|
prismaGetter={prisma.user.findMany}
|
|
columns={[
|
|
{
|
|
header: 'ID',
|
|
accessorKey: 'id',
|
|
},
|
|
{
|
|
header: 'First Name',
|
|
accessorKey: 'firstname',
|
|
},
|
|
{
|
|
header: 'Last Name',
|
|
accessorKey: 'lastname',
|
|
},
|
|
]}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|