aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/lib/hooks
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-20 23:51:28 +0000
committerMohamedBassem <me@mbassem.com>2024-03-20 23:51:28 +0000
commitd3d3ba9d4a37ac757b4b8e8e02feae384c95f0e9 (patch)
treeaab59e71c0c511c6b8ce0d916fd7fcd8071fea2b /apps/web/lib/hooks
parentd6d4e16b400e5ffa871e6c4f3d4a131e54240c70 (diff)
downloadkarakeep-d3d3ba9d4a37ac757b4b8e8e02feae384c95f0e9.tar.zst
feature(web): Add support for removing items from lists
Diffstat (limited to 'apps/web/lib/hooks')
-rw-r--r--apps/web/lib/hooks/list-context.tsx21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/web/lib/hooks/list-context.tsx b/apps/web/lib/hooks/list-context.tsx
new file mode 100644
index 00000000..cb8a20b2
--- /dev/null
+++ b/apps/web/lib/hooks/list-context.tsx
@@ -0,0 +1,21 @@
+"use client";
+
+import { createContext } from "react";
+
+export const BookmarkListContext = createContext<{
+ listId: string | undefined;
+}>({ listId: undefined });
+
+export function BookmarkListContextProvider({
+ listId,
+ children,
+}: {
+ listId: string;
+ children: React.ReactNode;
+}) {
+ return (
+ <BookmarkListContext.Provider value={{ listId }}>
+ {children}
+ </BookmarkListContext.Provider>
+ );
+}