aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/dashboard/lists/page.tsx
blob: 7950cd76e14ea54e210c428e896b7b7b2d1b44ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import AllListsView from "@/components/dashboard/lists/AllListsView";
import { PendingInvitationsCard } from "@/components/dashboard/lists/PendingInvitationsCard";
import { Separator } from "@/components/ui/separator";
import { useTranslation } from "@/lib/i18n/server";
import { api } from "@/server/api/client";

export default async function ListsPage() {
  // oxlint-disable-next-line rules-of-hooks
  const { t } = await useTranslation();
  const lists = await api.lists.list();

  return (
    <div className="flex flex-col gap-4">
      <PendingInvitationsCard />
      <div className="flex flex-col gap-3 rounded-md border bg-background p-4">
        <p className="text-2xl">📋 {t("lists.all_lists")}</p>
        <Separator />
        <AllListsView initialData={lists.lists} />
      </div>
    </div>
  );
}