From 8c205249941bbd503ee452b0dd857f173bf74363 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sat, 23 Aug 2025 17:18:12 +0300
Subject: fix: Hide bookmark global actions when there's no bookmark grid shown

---
 apps/web/components/dashboard/GlobalActions.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'apps/web/components/dashboard/GlobalActions.tsx')

diff --git a/apps/web/components/dashboard/GlobalActions.tsx b/apps/web/components/dashboard/GlobalActions.tsx
index d36b93d9..d385111a 100644
--- a/apps/web/components/dashboard/GlobalActions.tsx
+++ b/apps/web/components/dashboard/GlobalActions.tsx
@@ -3,13 +3,17 @@
 import BulkBookmarksAction from "@/components/dashboard/BulkBookmarksAction";
 import SortOrderToggle from "@/components/dashboard/SortOrderToggle";
 import ViewOptions from "@/components/dashboard/ViewOptions";
+import { useInBookmarkGridStore } from "@/lib/store/useInBookmarkGridStore";
 
 export default function GlobalActions() {
+  const inBookmarkGrid = useInBookmarkGridStore(
+    (state) => state.inBookmarkGrid,
+  );
   return (
     <div className="flex min-w-max flex-wrap overflow-hidden">
-      <ViewOptions />
-      <SortOrderToggle />
-      <BulkBookmarksAction />
+      {inBookmarkGrid && <ViewOptions />}
+      {inBookmarkGrid && <BulkBookmarksAction />}
+      {inBookmarkGrid && <SortOrderToggle />}
     </div>
   );
 }
-- 
cgit v1.2.3-70-g09d2

