Files
var-monorepo/apps/hub/app/page.tsx
2025-02-07 00:15:11 +01:00

40 lines
887 B
TypeScript

import Link from 'next/link';
import { PrismaClient } from '@repo/db';
import { PaginatedTable } from './_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
rowsPerPage={10}
prismaModel={'user'}
columns={[
{
header: 'ID',
accessorKey: 'id',
},
{
header: 'Email',
accessorKey: 'email',
},
{
header: 'First Name',
accessorKey: 'firstname',
},
{
header: 'Last Name',
accessorKey: 'lastname',
footer: 'Total',
},
]}
/>
</div>
);
}