From 8f0e9b182e971dff98b18c707d3eb6238abf286e Mon Sep 17 00:00:00 2001
From: Md Saban <45597394+mdsaban@users.noreply.github.com>
Date: Sun, 23 Jun 2024 17:08:34 +0530
Subject: ui(web): move layout selector to main screen (#252)

---
 .../dashboard/sidebar/SidebarProfileOptions.tsx    | 68 +---------------------
 1 file changed, 1 insertion(+), 67 deletions(-)

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

diff --git a/apps/web/components/dashboard/sidebar/SidebarProfileOptions.tsx b/apps/web/components/dashboard/sidebar/SidebarProfileOptions.tsx
index c2ae493a..af3f1548 100644
--- a/apps/web/components/dashboard/sidebar/SidebarProfileOptions.tsx
+++ b/apps/web/components/dashboard/sidebar/SidebarProfileOptions.tsx
@@ -7,69 +7,12 @@ import {
   DropdownMenu,
   DropdownMenuContent,
   DropdownMenuItem,
-  DropdownMenuSub,
-  DropdownMenuSubContent,
-  DropdownMenuSubTrigger,
   DropdownMenuTrigger,
 } from "@/components/ui/dropdown-menu";
-import { useBookmarkLayout } from "@/lib/userLocalSettings/bookmarksLayout";
-import { updateBookmarksLayout } from "@/lib/userLocalSettings/userLocalSettings";
-import {
-  Check,
-  LayoutDashboard,
-  LayoutGrid,
-  LayoutList,
-  LayoutPanelLeft,
-  LogOut,
-  Moon,
-  MoreHorizontal,
-  Paintbrush,
-  Sun,
-} from "lucide-react";
+import { LogOut, Moon, MoreHorizontal, Paintbrush, Sun } from "lucide-react";
 import { signOut } from "next-auth/react";
 import { useTheme } from "next-themes";
 
-function BookmarkLayoutSelector() {
-  const layout = useBookmarkLayout();
-
-  const checkedComp = <Check className="ml-2 size-4" />;
-
-  return (
-    <>
-      <DropdownMenuItem
-        className="justify-between"
-        onClick={async () => await updateBookmarksLayout("masonry")}
-      >
-        <div className="flex items-center gap-2">
-          <LayoutDashboard className="size-4" />
-          <span>Masonry</span>
-        </div>
-        {layout == "masonry" && checkedComp}
-      </DropdownMenuItem>
-      <DropdownMenuItem
-        className="justify-between"
-        onClick={async () => await updateBookmarksLayout("grid")}
-      >
-        <div className="flex items-center gap-2">
-          <LayoutGrid className="size-4" />
-          <span>Grid</span>
-        </div>
-        {layout == "grid" && checkedComp}
-      </DropdownMenuItem>
-      <DropdownMenuItem
-        className="justify-between"
-        onClick={async () => await updateBookmarksLayout("list")}
-      >
-        <div className="flex items-center gap-2">
-          <LayoutList className="size-4" />
-          <span>List</span>
-        </div>
-        {layout == "list" && checkedComp}
-      </DropdownMenuItem>
-    </>
-  );
-}
-
 function DarkModeToggle() {
   const { theme } = useTheme();
 
@@ -109,15 +52,6 @@ export default function SidebarProfileOptions() {
         <DropdownMenuItem onClick={toggleTheme}>
           <DarkModeToggle />
         </DropdownMenuItem>
-        <DropdownMenuSub>
-          <DropdownMenuSubTrigger>
-            <LayoutPanelLeft className="mr-2 size-4" />
-            <span>Layout</span>
-          </DropdownMenuSubTrigger>
-          <DropdownMenuSubContent>
-            <BookmarkLayoutSelector />
-          </DropdownMenuSubContent>
-        </DropdownMenuSub>
         <DropdownMenuItem
           onClick={() =>
             signOut({
-- 
cgit v1.2.3-70-g09d2

