diff --git a/apps/mobile/src/components/common/SubmitButton.tsx b/apps/mobile/src/components/common/SubmitButton.tsx index 0e1c5b3c9..fd048e333 100644 --- a/apps/mobile/src/components/common/SubmitButton.tsx +++ b/apps/mobile/src/components/common/SubmitButton.tsx @@ -3,6 +3,7 @@ import { useEffect } from "react" import type { PressableProps } from "react-native" import { ActivityIndicator } from "react-native" import Animated, { + cancelAnimation, interpolateColor, useAnimatedStyle, useSharedValue, @@ -25,6 +26,7 @@ export function SubmitButton({ const disabledValue = useSharedValue(1) useEffect(() => { + cancelAnimation(disabledValue) disabledValue.value = withTiming(props.disabled ? 1 : 0) }, [props.disabled]) diff --git a/apps/mobile/src/components/layouts/tabbar/Tabbar.tsx b/apps/mobile/src/components/layouts/tabbar/Tabbar.tsx index 1b4ff408b..5e1f1f38c 100644 --- a/apps/mobile/src/components/layouts/tabbar/Tabbar.tsx +++ b/apps/mobile/src/components/layouts/tabbar/Tabbar.tsx @@ -163,7 +163,8 @@ const TextLabel = (props: { color: interpolateColor(focusedValue.value, [0, 1], [inactiveTintColor, accentColor]), })) useEffect(() => { - focusedValue.value = withSpring(focused ? 1 : 0) + cancelAnimation(focusedValue) + focusedValue.value = withSpring(focused ? 1 : 0, { duration: 100 }) }, [focused, focusedValue]) return ( - +