···1import React from 'react'
02import {impactAsync, ImpactFeedbackStyle} from 'expo-haptics'
34import {isIOS, isWeb} from '#/platform/detection'
5import {useHapticsDisabled} from '#/state/preferences/disable-haptics'
067export function useHaptics() {
8 const isHapticsDisabled = useHapticsDisabled()
···18 ? ImpactFeedbackStyle[strength]
19 : ImpactFeedbackStyle.Light
20 impactAsync(style)
0000021 },
22 [isHapticsDisabled],
23 )
···1import React from 'react'
2+import * as Device from 'expo-device'
3import {impactAsync, ImpactFeedbackStyle} from 'expo-haptics'
45import {isIOS, isWeb} from '#/platform/detection'
6import {useHapticsDisabled} from '#/state/preferences/disable-haptics'
7+import * as Toast from '#/view/com/util/Toast'
89export function useHaptics() {
10 const isHapticsDisabled = useHapticsDisabled()
···20 ? ImpactFeedbackStyle[strength]
21 : ImpactFeedbackStyle.Light
22 impactAsync(style)
23+24+ // DEV ONLY - show a toast when a haptic is meant to fire on simulator
25+ if (__DEV__ && !Device.isDevice) {
26+ Toast.show(`Buzzz!`)
27+ }
28 },
29 [isHapticsDisabled],
30 )