refactored public page endpoints

This commit is contained in:
daniel31x13
2023-11-15 13:12:06 -05:00
parent 09ee81bf11
commit 59815f47d8
18 changed files with 262 additions and 128 deletions
+2 -1
View File
@@ -4,9 +4,10 @@ import Image from "next/image";
import { Link as LinkType, Tag } from "@prisma/client";
import isValidUrl from "@/lib/client/isValidUrl";
import unescapeString from "@/lib/client/unescapeString";
import { TagIncludingLinkCount } from "@/types/global";
interface LinksIncludingTags extends LinkType {
tags: Tag[];
tags: TagIncludingLinkCount[];
}
type Props = {
+6
View File
@@ -176,6 +176,9 @@ export default function Sidebar({ className }: { className?: string }) {
className="w-4 h-4 drop-shadow text-gray-500 dark:text-gray-300"
/>
) : undefined}
<div className="drop-shadow text-gray-500 dark:text-gray-300 text-xs">
{e._count?.links}
</div>
</div>
</Link>
);
@@ -235,6 +238,9 @@ export default function Sidebar({ className }: { className?: string }) {
<p className="text-black dark:text-white truncate w-full pr-7">
{e.name}
</p>
<div className="drop-shadow text-gray-500 dark:text-gray-300 text-xs">
{e._count?.links}
</div>
</div>
</Link>
);