feat: init
This commit is contained in:
11
apps/web/core/hooks/use-stickies.tsx
Normal file
11
apps/web/core/hooks/use-stickies.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useContext } from "react";
|
||||
// context
|
||||
import { StoreContext } from "@/lib/store-context";
|
||||
import type { IStickyStore } from "@/store/sticky/sticky.store";
|
||||
// plane web stores
|
||||
|
||||
export const useSticky = (): IStickyStore => {
|
||||
const context = useContext(StoreContext);
|
||||
if (context === undefined) throw new Error("useSticky must be used within StoreProvider");
|
||||
return context.stickyStore;
|
||||
};
|
||||
Reference in New Issue
Block a user