mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
* Changes required to enable Publish Views * default views to not found page * refactor exports * remove uncessary view service * fix review comments
12 lines
381 B
TypeScript
12 lines
381 B
TypeScript
import { useContext } from "react";
|
|
// lib
|
|
import { StoreContext } from "@/lib/store-provider";
|
|
// store
|
|
import { IIssueModuleStore } from "@/store/module.store";
|
|
|
|
export const useModule = (): IIssueModuleStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useModule must be used within StoreProvider");
|
|
return context.module;
|
|
};
|