From 9b02d3f01b843ba78a58f93d777f9c0c0b34e5ee Mon Sep 17 00:00:00 2001 From: Hailey Date: Sun, 4 Aug 2024 21:19:28 -0700 Subject: [PATCH] disable uitextview --- src/components/Typography.tsx | 9 ++++- .../com/composer/text-input/TextInput.tsx | 37 +++++++++---------- src/view/com/util/text/Text.tsx | 2 +- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/components/Typography.tsx b/src/components/Typography.tsx index 31dd931c6a..d73ed209af 100644 --- a/src/components/Typography.tsx +++ b/src/components/Typography.tsx @@ -57,7 +57,14 @@ export function Text({style, selectable, ...rest}: TextProps) { const t = useTheme() const s = normalizeTextStyles([atoms.text_sm, t.atoms.text, flatten(style)]) - return + return ( + + ) } export function createHeadingElement({level}: {level: number}) { diff --git a/src/view/com/composer/text-input/TextInput.tsx b/src/view/com/composer/text-input/TextInput.tsx index f69c895693..738a013e5e 100644 --- a/src/view/com/composer/text-input/TextInput.tsx +++ b/src/view/com/composer/text-input/TextInput.tsx @@ -2,7 +2,6 @@ import React, { ComponentProps, forwardRef, useCallback, - useMemo, useRef, useState, } from 'react' @@ -31,7 +30,7 @@ import { LinkFacetMatch, suggestLinkCardUri, } from 'view/com/composer/text-input/text-input-util' -import {Text} from 'view/com/util/text/Text' +// import {Text} from 'view/com/util/text/Text' import {Autocomplete} from './mobile/Autocomplete' export interface TextInputRef { @@ -180,22 +179,22 @@ export const TextInput = forwardRef(function TextInputImpl( [onChangeText, richtext, setAutocompletePrefix], ) - const textDecorated = useMemo(() => { - let i = 0 - - return Array.from(richtext.segments()).map(segment => { - return ( - - {segment.text} - - ) - }) - }, [richtext, pal.link, pal.text]) + // const textDecorated = useMemo(() => { + // let i = 0 + // + // return Array.from(richtext.segments()).map(segment => { + // return ( + // + // {segment.text} + // + // ) + // }) + // }, [richtext, pal.link, pal.text]) return ( @@ -220,7 +219,7 @@ export const TextInput = forwardRef(function TextInputImpl( {textAlignVertical: 'top'}, ]} {...props}> - {textDecorated} + {/*{textDecorated}*/} {children}