diff options
| author | Mohamed Bassem <me@mbassem.com> | 2024-11-03 17:30:17 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-11-03 17:30:17 +0000 |
| commit | fa8286aa900ea4f13c1c15d5b0f441436f042d8a (patch) | |
| tree | 380a2464f3777059aad67f37bcbdc9ada030327f /apps/web/app/dashboard/feeds | |
| parent | cf1a25131fd45ab7c9a72b837be525c24457cd8b (diff) | |
| download | karakeep-fa8286aa900ea4f13c1c15d5b0f441436f042d8a.tar.zst | |
feature(web): Add the ability to view the bookmarks of a particular rss feed
Diffstat (limited to 'apps/web/app/dashboard/feeds')
| -rw-r--r-- | apps/web/app/dashboard/feeds/[feedId]/page.tsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/web/app/dashboard/feeds/[feedId]/page.tsx b/apps/web/app/dashboard/feeds/[feedId]/page.tsx new file mode 100644 index 00000000..ed5f9e40 --- /dev/null +++ b/apps/web/app/dashboard/feeds/[feedId]/page.tsx @@ -0,0 +1,31 @@ +import { notFound } from "next/navigation"; +import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks"; +import { api } from "@/server/api/client"; +import { TRPCError } from "@trpc/server"; + +export default async function FeedPage({ + params, +}: { + params: { feedId: string }; +}) { + let feed; + try { + feed = await api.feeds.get({ feedId: params.feedId }); + } catch (e) { + if (e instanceof TRPCError) { + if (e.code == "NOT_FOUND") { + notFound(); + } + } + throw e; + } + + return ( + <Bookmarks + query={{ rssFeedId: feed.id }} + showDivider={true} + showEditorCard={false} + header={<div className="text-2xl">{feed.name}</div>} + /> + ); +} |
