import { PrismaClient } from '@repo/db';

export default async ({ params }: { params: Promise<{ id: string }> }) => {
  const prisma = new PrismaClient();
  const { id } = await params;

  const user = await prisma.user.findUnique({
    where: {
      id: id,
    },
  });
  console.log(user);
  return (
    <div>
      <h1>
        {user?.firstname} {user?.lastname}
      </h1>
      <p>{user?.email}</p>
      {/* TODO: Hier Nutzerdaten bearbeiten */}
    </div>
  );
};
