Skip to content

Commit

Permalink
fix(cms-status): fix cms status filter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpaige committed Sep 26, 2023
1 parent eb12ee3 commit 19c7052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ReactNode, useState } from "react";
import { FILTER_GROUPS as FC } from "./consts";
import { createContextProvider } from "@/utils";

export const [FilterDrawerContextProvider, useFilterDrawerContext] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { useOsAggregate, useOsParams } from "../useOpensearch";
import { OsFilterValue, OsRangeValue } from "shared-types";
import { useLabelMapping } from "@/hooks";
import { useFilterDrawerContext } from "./FilterProvider";
import { useGetUser } from "@/api/useGetUser";

export const useFilterDrawer = () => {
const { drawerOpen, setDrawerState } = useFilterDrawerContext();
const [filters, setFilters] = useState(Consts.FILTER_GROUPS);
const { data: user } = useGetUser();
const [filters, setFilters] = useState(Consts.FILTER_GROUPS(user?.isCms));
const [accordionValues, setAccordionValues] = useState<string[]>([]);
const params = useOsParams();
const labelMap = useLabelMapping();
Expand Down

0 comments on commit 19c7052

Please sign in to comment.