[CHORE] Refactor keys

This commit is contained in:
Oleg Shuralev 2021-02-15 23:36:25 +03:00
parent 8d088aa9d0
commit bec82c01db
No known key found for this signature in database
GPG key ID: 99C6BDC0A1C2E647
3 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ const MessagesTable: React.FC<MessagesTableProp> = ({ messages, onNext }) => {
{messages.map(
({ partition, offset, timestamp, content }: TopicMessage) => (
<MessageItem
key={timestamp.toString()}
key={`message-${timestamp.getTime()}`}
partition={partition}
offset={offset}
timestamp={timestamp}

View file

@ -29,13 +29,13 @@ exports[`MessagesTable when topic contains messages matches snapshot 1`] = `
"key": "val",
}
}
key="Fri May 05 1995 00:00:00 GMT+0400 (Moscow Summer Time)"
key="message-799617600000"
offset={2}
partition={1}
timestamp={1995-05-04T20:00:00.000Z}
/>
<MessageItem
key="Thu May 07 2020 00:00:00 GMT+0300 (Moscow Standard Time)"
key="message-1588798800000"
offset={20}
partition={2}
timestamp={2020-05-06T21:00:00.000Z}

View file

@ -88,7 +88,7 @@ const CustomParams: React.FC<Props> = ({ isSubmitting, config }) => {
{formCustomParams.allIndexes.map((index) => (
<CustomParamField
key={index}
key={formCustomParams.byIndex[index].name}
index={index}
isDisabled={isSubmitting}
name={formCustomParams.byIndex[index].name}