A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: Fix server side error on clipboard check
MohamedBassem8c4df0ff57c1
diff --git a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsxindex 06bead4f..4725c77f 100644--- a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx+++ b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx@@ -1,6 +1,6 @@"use client";-import { useState } from "react";+import { useEffect, useState } from "react";import { Button } from "@/components/ui/button";import {DropdownMenu,@@ -48,7 +48,17 @@ export default function BookmarkOptions({ bookmark }: { bookmark: ZBookmark }) {const linkId = bookmark.id;const demoMode = !!useClientConfig().demoMode;- const isClipboardAvailable = navigator && !!navigator.clipboard;++ const [isClipboardAvailable, setIsClipboardAvailable] = useState(false);++ useEffect(() => {+ // This code only runs in the browser+ setIsClipboardAvailable(+ typeof window !== "undefined" &&+ window.navigator &&+ !!window.navigator.clipboard,+ );+ }, []);const { setOpen: setManageListsModalOpen, content: manageListsModal } =useManageListsModal(bookmark.id);