import React from "react"; // hooks import useEstimateOption from "hooks/use-estimate-option"; // ui import { CustomSelect } from "components/ui"; // icons import { PlayIcon } from "@heroicons/react/24/outline"; // types import { UserAuth } from "types"; type Props = { value: number | null; onChange: (val: number | null) => void; userAuth: UserAuth; }; export const SidebarEstimateSelect: React.FC = ({ value, onChange, userAuth }) => { const isNotAllowed = userAuth.isGuest || userAuth.isViewer; const { isEstimateActive, estimatePoints } = useEstimateOption(); if (!isEstimateActive) return null; return (

Estimate

{estimatePoints?.find((e) => e.key === value)?.value ?? "Estimate"}
} onChange={onChange} position="right" width="w-full" disabled={isNotAllowed} > <> None {estimatePoints && estimatePoints.map((point) => ( <> {point.value} ))}
); };