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 { import {useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'
useCallback,
useEffect,
useImperativeHandle,
useMemo,
useRef,
useState,
} from 'react'
import { import {
type TextInput, type TextInput,
type TextInputSubmitEditingEvent, type TextInputSubmitEditingEvent,
@@ -253,8 +246,7 @@ export function Composer({
* Web keyboard handling * Web keyboard handling
*/ */
const isComposing = useRef(false) const isComposing = useRef(false)
const onKeyPressWeb = useCallback( const onKeyPressWeb = (e: React.KeyboardEvent | any) => {
(e: React.KeyboardEvent | any) => {
if (IS_WEB_TOUCH_DEVICE) return if (IS_WEB_TOUCH_DEVICE) return
if (isComposing.current) return if (isComposing.current) return
@@ -274,16 +266,14 @@ export function Composer({
nativeEvent: e.nativeEvent, nativeEvent: e.nativeEvent,
}) })
} }
}, }
[onRequestSubmit],
)
/* /*
* Sift popover positioning * Sift popover positioning
*/ */
const updateAutocompletePosition = useCallback(() => { const updateAutocompletePosition = () => {
sift.updatePosition() sift.updatePosition()
}, [sift]) }
const textContent = ( const textContent = (
<Text style={[textStyle, web({whiteSpace: 'pre-wrap'})]}> <Text style={[textStyle, web({whiteSpace: 'pre-wrap'})]}>