mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
3d09a69d58
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
16 lines
558 B
TypeScript
16 lines
558 B
TypeScript
import { useContext } from "react";
|
|
// mobx store
|
|
import { StoreContext } from "contexts/store-context";
|
|
// types
|
|
import { IInboxFilter } from "store/inbox/inbox_filter.store";
|
|
import { IInboxIssue } from "store/inbox/inbox_issue.store";
|
|
|
|
export const useInboxIssues = (): {
|
|
issues: IInboxIssue;
|
|
filters: IInboxFilter;
|
|
} => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useInboxIssues must be used within StoreProvider");
|
|
return { issues: context.inbox.inboxIssue, filters: context.inbox.inboxFilter };
|
|
};
|