Commit 7327c4cb authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix children not having keys in map

parent 8368f1ef
......@@ -144,21 +144,22 @@ const Event = (props) => {
}).filter(item => item)
.map((list) => {
while (list.length < 3) {
list.push({});
list.push({ member: null });
}
const key = list[0].member + list[1].member + list[2].member;
return (
<View style={styles.registrationsRow}>
<View key={key} style={styles.registrationsRow}>
{list.map((reg, i) => {
const style = i === 1 ? styles.registrationsItemMargin :
styles.registrationsItem;
if (reg.name) {
return (
<MemberView member={reg} style={style} />
<MemberView key={key + i.toString()} member={reg} style={style} />
);
}
return (
<View style={style} />
<View key={key + i.toString()} style={style} />
);
})}
</View>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment