Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

minor improvement

daniel31x13e9cf93d7699c
diff --git a/pages/public/collections/[id]/index.tsx b/pages/public/collections/[id]/index.tsx
index 04ea1daf..1e19b0c0 100644
--- a/pages/public/collections/[id]/index.tsx
+++ b/pages/public/collections/[id]/index.tsx
@@ -23,7 +23,6 @@ import LinkListOptions from "@/components/LinkListOptions";
import { usePublicLinks } from "@/hooks/store/publicLinks";
import Links from "@/components/LinkViews/Links";
import { usePublicTags } from "@/hooks/store/publicTags";
-import clsx from "clsx";
export default function PublicCollections() {
const { t } = useTranslation();
diff --git a/pages/public/collections/[id]/rss.tsx b/pages/public/collections/[id]/rss.tsx
index 7f0daead..8d8849a0 100644
--- a/pages/public/collections/[id]/rss.tsx
+++ b/pages/public/collections/[id]/rss.tsx
@@ -10,8 +10,8 @@ export const getServerSideProps: GetServerSideProps = async ({
res,
req,
}) => {
- const id = parseInt(params?.id as string, 10);
- if (isNaN(id)) {
+ const id = Number(params?.id as string);
+ if (isNaN(id) || !id) {
if (res) {
res.statusCode = 404;
res.end();
@@ -21,13 +21,13 @@ export const getServerSideProps: GetServerSideProps = async ({
const data = await prisma.collection.findUnique({
where: {
- id: parseInt(params?.id as string),
+ id,
isPublic: true,
},
include: {
links: {
orderBy: {
- createdAt: "desc",
+ id: "desc",
},
take: 20,
},