import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import { Control, Controller, UseFormSetValue } from "react-hook-form"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // components import { SelectProject, SelectSegment, SelectXAxis, SelectYAxis } from "components/analytics"; // types import { IAnalyticsParams } from "types"; type Props = { control: Control; setValue: UseFormSetValue; params: IAnalyticsParams; fullScreen: boolean; isProjectLevel: boolean; }; export const CustomAnalyticsSelectBar: React.FC = observer((props) => { const { control, setValue, params, fullScreen, isProjectLevel } = props; const router = useRouter(); const { workspaceSlug } = router.query; const { project: projectStore } = useMobxStore(); const projectsList = workspaceSlug ? projectStore.projects[workspaceSlug.toString()] : null; return (
{!isProjectLevel && (
Project
( )} />
)}
Measure (y-axis)
} />
Dimension (x-axis)
( { if (params.segment === val) setValue("segment", null); onChange(val); }} params={params} /> )} />
Group
( )} />
); });