-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(web): Add the ability to view the bookmarks of a particular r…
…ss feed
- Loading branch information
1 parent
cf1a251
commit fa8286a
Showing
5 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters