plane/web/hooks/use-workspace-view.tsx
Anmol Singh Bhatia a048e513b7
chore: workspace view display filters and properties , code refactor (#2295)
* chore: spreadsheet view context

* chore: spreadsheet context provider

* chore: spreadsheet view context

* chore: display filters and properties added in workspace view and code refactor

* fix: build error fix

* chore: set sub-issue display option to false for global views

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
2023-09-28 20:34:57 +05:30

12 lines
390 B
TypeScript

import { useContext } from "react";
// types
import { IWorkspaceViewContext, WorkspaceIssueViewContext } from "contexts/workspace-view-context";
export const useWorkspaceView = (): IWorkspaceViewContext => {
const context = useContext(WorkspaceIssueViewContext);
if (!context) throw new Error("useWorkspaceView must be used within a WorkspaceIssueViewContext");
return context;
};