From 293869e1743c925519d938ebeeff033c773a1ec6 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 7 Feb 2024 16:57:47 +0000 Subject: [ui] Styling the bookmarks page --- web/app/bookmarks/components/LinkCard.tsx | 74 +++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 13 deletions(-) (limited to 'web/app/bookmarks/components/LinkCard.tsx') diff --git a/web/app/bookmarks/components/LinkCard.tsx b/web/app/bookmarks/components/LinkCard.tsx index 103f97ef..75973f7e 100644 --- a/web/app/bookmarks/components/LinkCard.tsx +++ b/web/app/bookmarks/components/LinkCard.tsx @@ -1,19 +1,67 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { + ImageCard, + ImageCardBody, + ImageCardFooter, + ImageCardTitle, +} from "@/components/ui/imageCard"; import { ZBookmarkedLink } from "@/lib/types/api/links"; +import { MoreHorizontal, Trash2 } from "lucide-react"; import Link from "next/link"; -export default async function LinkCard({ link }: { link: ZBookmarkedLink }) { +export function LinkOptions() { + // TODO: Implement deletion + return ( + + + + + + + + Delete + + + + ); +} + +export default function LinkCard({ link }: { link: ZBookmarkedLink }) { + const parsedUrl = new URL(link.url); + return ( - -
-

- {link.details?.favicon && ( - // eslint-disable-next-line @next/next/no-img-element - - )} - {link.details?.title ?? link.id} -

-

{link.details?.description ?? link.url}

-
- + + + + {link.details?.title ?? parsedUrl.host} + + + + +
+
+ + {parsedUrl.host} + +
+ +
+
+
); } -- cgit v1.2.3-70-g09d2