Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {useEffect, useState} from 'react'
|
||||
import {Keyboard} from 'react-native'
|
||||
|
||||
import {isIOS} from '#/platform/detection'
|
||||
import {IS_IOS} from '#/env'
|
||||
|
||||
export function useIsKeyboardVisible({
|
||||
iosUseWillEvents,
|
||||
@@ -14,9 +14,9 @@ export function useIsKeyboardVisible({
|
||||
// only iOS supports the "will" events
|
||||
// -prf
|
||||
const showEvent =
|
||||
isIOS && iosUseWillEvents ? 'keyboardWillShow' : 'keyboardDidShow'
|
||||
IS_IOS && iosUseWillEvents ? 'keyboardWillShow' : 'keyboardDidShow'
|
||||
const hideEvent =
|
||||
isIOS && iosUseWillEvents ? 'keyboardWillHide' : 'keyboardDidHide'
|
||||
IS_IOS && iosUseWillEvents ? 'keyboardWillHide' : 'keyboardDidHide'
|
||||
|
||||
useEffect(() => {
|
||||
const keyboardShowListener = Keyboard.addListener(showEvent, () =>
|
||||
|
||||
Reference in New Issue
Block a user