summaryrefslogtreecommitdiff
path: root/src/components/ToggleSwitch.tsx
diff options
context:
space:
mode:
authorHaishan <[email protected]>2022-06-06 23:39:56 +0800
committerHaishan <[email protected]>2022-06-06 23:39:56 +0800
commit78f3434cb52f53c66936de278f0828c19ef63666 (patch)
treee7f9685cc0f3d8eaa6a94ad330e8876752ecb276 /src/components/ToggleSwitch.tsx
parent23e734aa548354bb7ceff5ad8d85de95cd860a55 (diff)
Run prettier
Diffstat (limited to 'src/components/ToggleSwitch.tsx')
-rw-r--r--src/components/ToggleSwitch.tsx5
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) => {