From c2bd6d6b33dc24c4321228add4fedfade93eb014 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sun, 17 Mar 2024 10:15:01 +0000 Subject: refactor: Prepare for pagination by dropping querying bookmarks by id --- apps/web/app/dashboard/lists/[listId]/page.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'apps/web/app/dashboard/lists') diff --git a/apps/web/app/dashboard/lists/[listId]/page.tsx b/apps/web/app/dashboard/lists/[listId]/page.tsx index 4e35c377..b9a26053 100644 --- a/apps/web/app/dashboard/lists/[listId]/page.tsx +++ b/apps/web/app/dashboard/lists/[listId]/page.tsx @@ -1,6 +1,6 @@ import { notFound, redirect } from "next/navigation"; +import BookmarksGrid from "@/components/dashboard/bookmarks/BookmarksGrid"; import DeleteListButton from "@/components/dashboard/lists/DeleteListButton"; -import ListView from "@/components/dashboard/lists/ListView"; import { api } from "@/server/api/client"; import { getServerAuthSession } from "@/server/auth"; import { TRPCError } from "@trpc/server"; @@ -27,7 +27,10 @@ export default async function ListPage({ throw e; } - const bookmarks = await api.bookmarks.getBookmarks({ ids: list.bookmarks }); + const bookmarks = await api.bookmarks.getBookmarks({ + listId: list.id, + archived: false, + }); return (
@@ -38,7 +41,10 @@ export default async function ListPage({

- + ); } -- cgit v1.2.3-70-g09d2