From eefc57426911c800d5ea15faf8ecb317199606de Mon Sep 17 00:00:00 2001 From: dtun Date: Sun, 18 Aug 2024 09:29:30 -0700 Subject: [PATCH] Pass correct function to useOnAccessibilityAction --- components/ControlSlider.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/ControlSlider.tsx b/components/ControlSlider.tsx index 0427ca7..8922d91 100644 --- a/components/ControlSlider.tsx +++ b/components/ControlSlider.tsx @@ -33,7 +33,7 @@ export function ControlSlider({ value, }); let onAccessibilityAction = useOnAccessibilityAction({ - setValue, + updateValue, value, }); @@ -64,10 +64,10 @@ export function ControlSlider({ } function useOnAccessibilityAction({ - setValue, + updateValue, value, }: { - setValue: (value: number) => void; + updateValue: (value: number) => void; value: number; }) { return useEvent(function (e: AccessibilityActionEvent) { @@ -75,10 +75,10 @@ function useOnAccessibilityAction({ switch (actionName) { case incrementAction.name: - setValue(value + 10); + updateValue(value + 10); break; case decrementAction.name: - setValue(value - 10); + updateValue(value - 10); break; default: break;