diff options
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> + ); +} |
