From 994691b02515dfb579a5c3618631065bd76b9e4b Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 7 Apr 2024 19:02:52 +0100
Subject: refactor(web): Move the tooltip provider to the root of the app

---
 .../web/components/dashboard/preview/ActionBar.tsx | 117 ++++++++++-----------
 1 file changed, 57 insertions(+), 60 deletions(-)

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

diff --git a/apps/web/components/dashboard/preview/ActionBar.tsx b/apps/web/components/dashboard/preview/ActionBar.tsx
index f2e3023e..45d67b34 100644
--- a/apps/web/components/dashboard/preview/ActionBar.tsx
+++ b/apps/web/components/dashboard/preview/ActionBar.tsx
@@ -2,7 +2,6 @@ import { ActionButton } from "@/components/ui/action-button";
 import {
   Tooltip,
   TooltipContent,
-  TooltipProvider,
   TooltipTrigger,
 } from "@/components/ui/tooltip";
 import { toast } from "@/components/ui/use-toast";
@@ -52,64 +51,62 @@ export default function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
     });
 
   return (
-    <TooltipProvider>
-      <div className="flex items-center justify-center gap-3">
-        <Tooltip delayDuration={0}>
-          <TooltipTrigger>
-            <ActionButton
-              variant="none"
-              className="size-14 rounded-full bg-background"
-              loading={pendingFav}
-              onClick={() => {
-                favBookmark({
-                  bookmarkId: bookmark.id,
-                  favourited: !bookmark.favourited,
-                });
-              }}
-            >
-              <FavouritedActionIcon favourited={bookmark.favourited} />
-            </ActionButton>
-          </TooltipTrigger>
-          <TooltipContent side="bottom">
-            {bookmark.favourited ? "Un-favourite" : "Favourite"}
-          </TooltipContent>
-        </Tooltip>
-        <Tooltip delayDuration={0}>
-          <TooltipTrigger>
-            <ActionButton
-              variant="none"
-              loading={pendingArchive}
-              className="size-14 rounded-full bg-background"
-              onClick={() => {
-                archiveBookmark({
-                  bookmarkId: bookmark.id,
-                  archived: !bookmark.archived,
-                });
-              }}
-            >
-              <ArchivedActionIcon archived={bookmark.archived} />
-            </ActionButton>
-          </TooltipTrigger>
-          <TooltipContent side="bottom">
-            {bookmark.archived ? "Un-archive" : "Archive"}
-          </TooltipContent>
-        </Tooltip>
-        <Tooltip delayDuration={0}>
-          <TooltipTrigger>
-            <ActionButton
-              loading={pendingDeletion}
-              className="size-14 rounded-full bg-background"
-              variant="none"
-              onClick={() => {
-                deleteBookmark({ bookmarkId: bookmark.id });
-              }}
-            >
-              <Trash2 />
-            </ActionButton>
-          </TooltipTrigger>
-          <TooltipContent side="bottom">Delete</TooltipContent>
-        </Tooltip>
-      </div>
-    </TooltipProvider>
+    <div className="flex items-center justify-center gap-3">
+      <Tooltip delayDuration={0}>
+        <TooltipTrigger>
+          <ActionButton
+            variant="none"
+            className="size-14 rounded-full bg-background"
+            loading={pendingFav}
+            onClick={() => {
+              favBookmark({
+                bookmarkId: bookmark.id,
+                favourited: !bookmark.favourited,
+              });
+            }}
+          >
+            <FavouritedActionIcon favourited={bookmark.favourited} />
+          </ActionButton>
+        </TooltipTrigger>
+        <TooltipContent side="bottom">
+          {bookmark.favourited ? "Un-favourite" : "Favourite"}
+        </TooltipContent>
+      </Tooltip>
+      <Tooltip delayDuration={0}>
+        <TooltipTrigger>
+          <ActionButton
+            variant="none"
+            loading={pendingArchive}
+            className="size-14 rounded-full bg-background"
+            onClick={() => {
+              archiveBookmark({
+                bookmarkId: bookmark.id,
+                archived: !bookmark.archived,
+              });
+            }}
+          >
+            <ArchivedActionIcon archived={bookmark.archived} />
+          </ActionButton>
+        </TooltipTrigger>
+        <TooltipContent side="bottom">
+          {bookmark.archived ? "Un-archive" : "Archive"}
+        </TooltipContent>
+      </Tooltip>
+      <Tooltip delayDuration={0}>
+        <TooltipTrigger>
+          <ActionButton
+            loading={pendingDeletion}
+            className="size-14 rounded-full bg-background"
+            variant="none"
+            onClick={() => {
+              deleteBookmark({ bookmarkId: bookmark.id });
+            }}
+          >
+            <Trash2 />
+          </ActionButton>
+        </TooltipTrigger>
+        <TooltipContent side="bottom">Delete</TooltipContent>
+      </Tooltip>
+    </div>
   );
 }
-- 
cgit v1.2.3-70-g09d2

