Skip to content

Commit

Permalink
Add haptic feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzaizzat committed Apr 19, 2024
1 parent 0d71c66 commit ec51204
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/mobile/src/components/GalleryEditor/SortableRow.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ec51204

Please sign in to comment.