[WEB-578] feat: projects list filtering and ordering (#3926)
* style: project card UI updated * dev: initialize project filter store and types * chore: implemented filtering logic * chore: implemented ordering * chore: my projects filter added * chore: update created at date filter options * refactor: order by dropdown * style: revert project card UI * fix: project card z-index * fix: members filtering * fix: build errors
This commit is contained in:
parent
c3c6ef8830
commit
69e110f4a8
43 changed files with 1452 additions and 186 deletions
|
|
@ -11,6 +11,7 @@ export * from "./use-member";
|
|||
export * from "./use-mention";
|
||||
export * from "./use-module";
|
||||
export * from "./use-page";
|
||||
export * from "./use-project-filter";
|
||||
export * from "./use-project-publish";
|
||||
export * from "./use-project-state";
|
||||
export * from "./use-project-view";
|
||||
|
|
|
|||
11
web/hooks/store/use-project-filter.ts
Normal file
11
web/hooks/store/use-project-filter.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { useContext } from "react";
|
||||
// mobx store
|
||||
import { StoreContext } from "contexts/store-context";
|
||||
// types
|
||||
import { IProjectFilterStore } from "store/project/project_filter.store";
|
||||
|
||||
export const useProjectFilter = (): IProjectFilterStore => {
|
||||
const context = useContext(StoreContext);
|
||||
if (context === undefined) throw new Error("useProjectFilter must be used within StoreProvider");
|
||||
return context.projectRoot.projectFilter;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue