1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Try again

This commit is contained in:
Zhiyuan Zheng
2021-01-23 03:15:15 +01:00
parent 86231fb7b7
commit 8024871a8d
6 changed files with 4 additions and 18 deletions

View File

@ -1,14 +1,11 @@
import * as Haptics from 'expo-haptics'
import { Platform } from 'react-native'
import * as Sentry from 'sentry-expo'
const haptics = (
type: 'Success' | 'Warning' | 'Error' | 'Light' | 'Medium' | 'Heavy'
) => {
if (Platform.OS === 'android') {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error => {
// Sentry.Native.captureException(error)
})
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error => {})
return
}
@ -17,17 +14,13 @@ const haptics = (
case 'Warning':
case 'Error':
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
error => {
// Sentry.Native.captureException(error)
}
error => {}
)
break
case 'Light':
case 'Medium':
case 'Heavy':
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error => {
// Sentry.Native.captureException(error)
})
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error => {})
}
}