fixed topic.id bug

This commit is contained in:
Leon Liang 2019-12-06 02:26:01 -05:00
parent a4efc15d58
commit 116f97bf64

View File

@ -254,24 +254,20 @@ class user extends Component {
this.state.myTopics.includes(topic) ? ( this.state.myTopics.includes(topic) ? (
<MyChip <MyChip
label={topic} label={topic}
key={{ topic }.topic.id} // BUG: this value is undefined key={{ topic }.id}
onDelete onDelete
deleteIcon={<DoneIcon />} deleteIcon={<DoneIcon />}
/> />
) : this.state.following ? ( ) : this.state.following ? (
<MyChip <MyChip
label={topic} label={topic}
key={{ topic }.topic.id} // BUG: this value is undefined key={{ topic }.id}
color="secondary" color="secondary"
clickable clickable
onClick={key => this.handleAdd(topic)} onClick={key => this.handleAdd(topic)}
/> />
) : ( ) : (
<MyChip <MyChip label={topic} key={{ topic }.id} color="secondary" />
label={topic}
key={{ topic }.topic.id} // BUG: this value is undefined
color="secondary"
/>
) )
) : ( ) : (
<p></p> <p></p>