- {fieldsToShow.map(field => renderMessageField(field, message[field]))}
+
+ {proposal?.messages?.map((message: any, index: number) => {
+ const messageType = message['@type'];
+ const fieldsToShow = importantFields[messageType] || defaultFields;
+
+ return (
+
+
+ {messageType.split('.').pop().replace('Msg', '')}
+
+
+ {fieldsToShow.map(field => renderMessageField(field, message[field]))}
+
-
- );
- })}
+ );
+ })}
+