diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-20 23:51:28 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-20 23:51:28 +0000 |
| commit | d3d3ba9d4a37ac757b4b8e8e02feae384c95f0e9 (patch) | |
| tree | aab59e71c0c511c6b8ce0d916fd7fcd8071fea2b /apps/web/lib | |
| parent | d6d4e16b400e5ffa871e6c4f3d4a131e54240c70 (diff) | |
| download | karakeep-d3d3ba9d4a37ac757b4b8e8e02feae384c95f0e9.tar.zst | |
feature(web): Add support for removing items from lists
Diffstat (limited to 'apps/web/lib')
| -rw-r--r-- | apps/web/lib/hooks/list-context.tsx | 21 |
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> + ); +} |
