mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
import { createContext, useContext } from "react";
|
|
import { EIssuesStoreType } from "@/constants/issue";
|
|
import { useIssues } from "./store";
|
|
|
|
export const IssuesStoreContext = createContext<EIssuesStoreType>(EIssuesStoreType.PROJECT);
|
|
|
|
export const useIssueStoreType = () => {
|
|
const storeType = useContext(IssuesStoreContext);
|
|
|
|
return storeType;
|
|
};
|
|
|
|
export const useIssuesStore = () => {
|
|
const storeType = useContext(IssuesStoreContext);
|
|
|
|
return useIssues(storeType);
|
|
};
|