blob: 2f9e54c656bceb3d230e784876836a8197a39230 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import AllListsView from "@/components/dashboard/lists/AllListsView";
import { EditListModal } from "@/components/dashboard/lists/EditListModal";
import { PendingInvitationsCard } from "@/components/dashboard/lists/PendingInvitationsCard";
import { Button } from "@/components/ui/button";
import { useTranslation } from "@/lib/i18n/server";
import { api } from "@/server/api/client";
import { Plus } from "lucide-react";
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">
<div className="flex items-center justify-between">
<p className="text-2xl">📋 {t("lists.all_lists")}</p>
<EditListModal>
<Button className="flex items-center">
<Plus className="mr-2 size-4" />
<span>{t("lists.new_list")}</span>
</Button>
</EditListModal>
</div>
<PendingInvitationsCard />
<div className="flex flex-col gap-3 rounded-md border bg-background p-4">
<AllListsView initialData={lists.lists} />
</div>
</div>
);
}
|