diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-17 10:15:01 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-17 10:22:38 +0000 |
| commit | c2bd6d6b33dc24c4321228add4fedfade93eb014 (patch) | |
| tree | 6a3d52dbea3143cb95049293e06ef4a1b4efcdeb /apps/web/components/dashboard/lists/ListView.tsx | |
| parent | 0b99fe783aaebc5baca40f9d1b837278811cd228 (diff) | |
| download | karakeep-c2bd6d6b33dc24c4321228add4fedfade93eb014.tar.zst | |
refactor: Prepare for pagination by dropping querying bookmarks by id
Diffstat (limited to 'apps/web/components/dashboard/lists/ListView.tsx')
| -rw-r--r-- | apps/web/components/dashboard/lists/ListView.tsx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/apps/web/components/dashboard/lists/ListView.tsx b/apps/web/components/dashboard/lists/ListView.tsx deleted file mode 100644 index beeea7f1..00000000 --- a/apps/web/components/dashboard/lists/ListView.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client"; - -import BookmarksGrid from "@/components/dashboard/bookmarks/BookmarksGrid"; -import { api } from "@/lib/trpc"; - -import type { ZBookmark } from "@hoarder/trpc/types/bookmarks"; -import type { ZBookmarkListWithBookmarks } from "@hoarder/trpc/types/lists"; - -export default function ListView({ - bookmarks, - list: initialData, -}: { - list: ZBookmarkListWithBookmarks; - bookmarks: ZBookmark[]; -}) { - const { data } = api.lists.get.useQuery( - { listId: initialData.id }, - { - initialData, - }, - ); - - return ( - <BookmarksGrid query={{ ids: data.bookmarks }} bookmarks={bookmarks} /> - ); -} |
