File tree Expand file tree Collapse file tree 1 file changed +14
-22
lines changed
package/src/components/Message/MessageSimple/utils Expand file tree Collapse file tree 1 file changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -182,20 +182,17 @@ export const renderText = <
182182 }
183183 } ;
184184
185- state . withinLink = true ;
186- const link = React . createElement (
187- Text ,
188- {
189- key : state . key ,
190- onLongPress,
191- onPress,
192- style : styles . autolink ,
193- suppressHighlighting : true ,
194- } ,
195- output ( node . content , state ) ,
185+ return (
186+ < Text
187+ key = { state . key }
188+ onLongPress = { onLongPress }
189+ onPress = { onPress }
190+ style = { styles . autolink }
191+ suppressHighlighting = { true }
192+ >
193+ { output ( node . content , { ...state , withinLink : true } ) }
194+ </ Text >
196195 ) ;
197- state . withinLink = false ;
198- return link ;
199196 } ;
200197
201198 const mentionedUsers = Array . isArray ( mentioned_users )
@@ -230,15 +227,10 @@ export const renderText = <
230227 }
231228 } ;
232229
233- return React . createElement (
234- Text ,
235- {
236- key : state . key ,
237- onLongPress,
238- onPress,
239- style : styles . mentions ,
240- } ,
241- Array . isArray ( node . content ) ? node . content [ 0 ] ?. content || '' : output ( node . content , state ) ,
230+ return (
231+ < Text key = { state . key } onLongPress = { onLongPress } onPress = { onPress } style = { styles . mentions } >
232+ { Array . isArray ( node . content ) ? node . content [ 0 ] . content || '' : output ( node . content , state ) }
233+ </ Text >
242234 ) ;
243235 } ;
244236
You can’t perform that action at this time.
0 commit comments