From fe13408831dce4bdae4911098d6079a097cae9e8 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Tue, 9 Apr 2024 15:49:24 +0100
Subject: feature(web): Allow uploading directly into lists/tags. Fixes #69

---
 apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
index e3cfc796..a8ec1ab5 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
@@ -1,6 +1,6 @@
 "use client";
 
-import { useContext, useState } from "react";
+import { useState } from "react";
 import { Button } from "@/components/ui/button";
 import {
   DropdownMenu,
@@ -10,7 +10,6 @@ import {
 } from "@/components/ui/dropdown-menu";
 import { useToast } from "@/components/ui/use-toast";
 import { useClientConfig } from "@/lib/clientConfig";
-import { BookmarkListContext } from "@/lib/hooks/list-context";
 import {
   Link,
   List,
@@ -29,6 +28,7 @@ import {
   useUpdateBookmark,
 } from "@hoarder/shared-react/hooks//bookmarks";
 import { useRemoveBookmarkFromList } from "@hoarder/shared-react/hooks//lists";
+import { useBookmarkGridContext } from "@hoarder/shared-react/hooks/bookmark-grid-context";
 
 import { useAddToListModal } from "./AddToListModal";
 import { BookmarkedTextEditor } from "./BookmarkedTextEditor";
@@ -48,7 +48,7 @@ export default function BookmarkOptions({ bookmark }: { bookmark: ZBookmark }) {
 
   const [isTextEditorOpen, setTextEditorOpen] = useState(false);
 
-  const { listId } = useContext(BookmarkListContext);
+  const { listId } = useBookmarkGridContext() ?? {};
 
   const onError = () => {
     toast({
-- 
cgit v1.2.3-70-g09d2

