forked from github/plane
[WEB-682] feat: cycles list filtering and searching (#3910)
* chore: implemented cycles list filters and ordering * chore: active cycle tab updated * refactor: cycles folder structure * fix: name search inout auto-focus * fix: cycles ordering * refactor: move cycle filters logic to mobx store from local storage * chore: show completed cycles in a disclosure * chore: added completed cycles count * refactor: cycles mapping logic --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4b30339a59
commit
535731141f
@@ -1,7 +1,8 @@
|
||||
export * from "./use-application";
|
||||
export * from "./use-event-tracker";
|
||||
export * from "./use-calendar-view";
|
||||
export * from "./use-cycle-filter";
|
||||
export * from "./use-cycle";
|
||||
export * from "./use-event-tracker";
|
||||
export * from "./use-dashboard";
|
||||
export * from "./use-estimate";
|
||||
export * from "./use-global-view";
|
||||
|
||||
11
web/hooks/store/use-cycle-filter.ts
Normal file
11
web/hooks/store/use-cycle-filter.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useContext } from "react";
|
||||
// mobx store
|
||||
import { StoreContext } from "contexts/store-context";
|
||||
// types
|
||||
import { ICycleFilterStore } from "store/cycle_filter.store";
|
||||
|
||||
export const useCycleFilter = (): ICycleFilterStore => {
|
||||
const context = useContext(StoreContext);
|
||||
if (context === undefined) throw new Error("useCycleFilter must be used within StoreProvider");
|
||||
return context.cycleFilter;
|
||||
};
|
||||
Reference in New Issue
Block a user