mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
13 lines
442 B
TypeScript
13 lines
442 B
TypeScript
|
import { useContext } from "react";
|
||
|
// context
|
||
|
import { StoreContext } from "@/lib/store-context";
|
||
|
// mobx store
|
||
|
import { IProjectEstimateStore } from "@/store/estimates/project-estimate.store";
|
||
|
|
||
|
export const useProjectEstimates = (): IProjectEstimateStore => {
|
||
|
const context = useContext(StoreContext);
|
||
|
if (context === undefined) throw new Error("useProjectPage must be used within StoreProvider");
|
||
|
|
||
|
return context.projectEstimate;
|
||
|
};
|