Remove a couple unneede callbacks

This commit is contained in:
Eric Bailey
2026-04-07 16:42:07 -05:00
parent 7183d93dd1
commit b2b0297d48
+5 -15
View File
@@ -1,11 +1,4 @@
import {
useCallback,
useEffect,
useImperativeHandle,
useMemo,
useRef,
useState,
} from 'react'
import {useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'
import {
type TextInput,
type TextInputSubmitEditingEvent,
@@ -253,8 +246,7 @@ export function Composer({
* Web keyboard handling
*/
const isComposing = useRef(false)
const onKeyPressWeb = useCallback(
(e: React.KeyboardEvent | any) => {
const onKeyPressWeb = (e: React.KeyboardEvent | any) => {
if (IS_WEB_TOUCH_DEVICE) return
if (isComposing.current) return
@@ -274,16 +266,14 @@ export function Composer({
nativeEvent: e.nativeEvent,
})
}
},
[onRequestSubmit],
)
}
/*
* Sift popover positioning
*/
const updateAutocompletePosition = useCallback(() => {
const updateAutocompletePosition = () => {
sift.updatePosition()
}, [sift])
}
const textContent = (
<Text style={[textStyle, web({whiteSpace: 'pre-wrap'})]}>