From ec512043fd5e659cddec26563080111e59e59db0 Mon Sep 17 00:00:00 2001 From: Jakz Date: Fri, 19 Apr 2024 20:36:54 +0800 Subject: [PATCH] Add haptic feedback --- apps/mobile/src/components/GalleryEditor/SortableRow.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/mobile/src/components/GalleryEditor/SortableRow.tsx b/apps/mobile/src/components/GalleryEditor/SortableRow.tsx index 834aee203..f60c7d7c0 100644 --- a/apps/mobile/src/components/GalleryEditor/SortableRow.tsx +++ b/apps/mobile/src/components/GalleryEditor/SortableRow.tsx @@ -1,5 +1,6 @@ import { useCallback } from 'react'; import { Gesture, GestureDetector } from 'react-native-gesture-handler'; +import { trigger } from 'react-native-haptic-feedback'; import Animated, { runOnJS, SharedValue, @@ -107,6 +108,8 @@ export function SortableRow({ contextY.value = positions.value[index] ?? 0; translateX.value = event.translationX; + + runOnJS(trigger)('impactLight'); }) .onUpdate((event) => { const { translationY } = event;