Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33048304
D9747.1768421388.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
983 B
Referenced Files
None
Subscribers
None
D9747.1768421388.diff
View Options
diff --git a/native/profile/tunnelbroker-menu.react.js b/native/profile/tunnelbroker-menu.react.js
--- a/native/profile/tunnelbroker-menu.react.js
+++ b/native/profile/tunnelbroker-menu.react.js
@@ -41,6 +41,16 @@
}
}, [message, recipient, sendMessage]);
+ const messagesList = React.useMemo(
+ () =>
+ messages.map((msg, id) => (
+ <View key={`${id}-${msg?.messageID ?? ''}`} style={styles.section}>
+ <Text style={styles.submenuText}>{JSON.stringify(msg)}</Text>
+ </View>
+ )),
+ [messages, styles],
+ );
+
return (
<ScrollView
contentContainerStyle={styles.scrollViewContentContainer}
@@ -85,11 +95,7 @@
</View>
<Text style={styles.header}>MESSAGES</Text>
- {messages.map(msg => (
- <View key={msg.messageID} style={styles.section}>
- <Text style={styles.submenuText}>{JSON.stringify(msg)}</Text>
- </View>
- ))}
+ {messagesList}
</ScrollView>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 8:09 PM (10 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5933735
Default Alt Text
D9747.1768421388.diff (983 B)
Attached To
Mode
D9747: [native] avoid control flow inside JSX in Tunnelbroker screen
Attached
Detach File
Event Timeline
Log In to Comment