From 836185c961d2e05d454b0216388ceb4f8300caf8 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 28 Feb 2024 12:21:48 +0000
Subject: feature: Add copy link to bookmark options

---
 .../app/dashboard/bookmarks/components/BookmarkOptions.tsx   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'packages/web/app/dashboard/bookmarks/components/BookmarkOptions.tsx')

diff --git a/packages/web/app/dashboard/bookmarks/components/BookmarkOptions.tsx b/packages/web/app/dashboard/bookmarks/components/BookmarkOptions.tsx
index 6c1133fb..b8f6d8f2 100644
--- a/packages/web/app/dashboard/bookmarks/components/BookmarkOptions.tsx
+++ b/packages/web/app/dashboard/bookmarks/components/BookmarkOptions.tsx
@@ -12,6 +12,7 @@ import {
 } from "@/components/ui/dropdown-menu";
 import {
   Archive,
+  Link,
   MoreHorizontal,
   RotateCw,
   Star,
@@ -100,6 +101,17 @@ export default function BookmarkOptions({ bookmark }: { bookmark: ZBookmark }) {
             <Archive className="mr-2 size-4" />
             <span>{bookmark.archived ? "Un-archive" : "Archive"}</span>
           </DropdownMenuItem>
+          <DropdownMenuItem
+            onClick={() => {
+              navigator.clipboard.writeText(bookmark.content.url);
+              toast({
+                description: "Link was added to your clipboard!",
+              });
+            }}
+          >
+            <Link className="mr-2 size-4" />
+            <span>Copy Link</span>
+          </DropdownMenuItem>
           <DropdownMenuItem onClick={() => setTagModalIsOpen(true)}>
             <Tags className="mr-2 size-4" />
             <span>Edit Tags</span>
-- 
cgit v1.2.3-70-g09d2

