import React from "react";
import GroupPage from "@/app/_components/group/group-page";
import { api, HydrateClient } from "@/trpc/server";

async function Page({
  params,
}: {
  params: Promise<{
    id: string;
  }>;
}) {
  const { id } = await params;
  void api.group.get.prefetch({ id });

  return (
    <HydrateClient>
      <GroupPage groupId={id} />
    </HydrateClient>
  );
}

export default Page;
