This commit is contained in:
Hailey
2024-05-01 18:31:49 -07:00
parent e2f06e2bd2
commit ae775295ca
+5 -5
View File
@@ -24,10 +24,6 @@ export const GrowWrapper = React.forwardRef(function GrowWrapper(
}, },
ref, ref,
) { ) {
useImperativeHandle(ref, () => ({
reset,
}))
const scale = useSharedValue(1) const scale = useSharedValue(1)
const animationDidComplete = useSharedValue(false) const animationDidComplete = useSharedValue(false)
@@ -56,11 +52,15 @@ export const GrowWrapper = React.forwardRef(function GrowWrapper(
} }
}, [animationDidComplete, reset]) }, [animationDidComplete, reset])
useImperativeHandle(ref, () => ({
reset,
}))
return ( return (
<AnimatedPressable <AnimatedPressable
onPressIn={onTouchStart}
style={animatedStyle} style={animatedStyle}
unstable_pressDelay={300} unstable_pressDelay={300}
onPressIn={onTouchStart}
onTouchEnd={onTouchEnd}> onTouchEnd={onTouchEnd}>
{children} {children}
</AnimatedPressable> </AnimatedPressable>