diff options
Diffstat (limited to 'src/components/ToggleSwitch.tsx')
| -rw-r--r-- | src/components/ToggleSwitch.tsx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/components/ToggleSwitch.tsx b/src/components/ToggleSwitch.tsx index 9eb1019..58400c9 100644 --- a/src/components/ToggleSwitch.tsx +++ b/src/components/ToggleSwitch.tsx @@ -10,10 +10,7 @@ type Props = { }; function ToggleSwitch({ options, value, name, onChange }: Props) { - const idxSelected = useMemo( - () => options.map((o) => o.value).indexOf(value), - [options, value] - ); + const idxSelected = useMemo(() => options.map((o) => o.value).indexOf(value), [options, value]); const getPortionPercentage = useCallback( (idx: number) => { |
