Skip to content
Snippets Groups Projects
Commit a59aa86d authored by Julia Friesel's avatar Julia Friesel
Browse files

Fix key

parent ff60db08
No related branches found
No related tags found
No related merge requests found
......@@ -190,12 +190,16 @@ class SymptomBox extends Component {
class FillerBoxes extends Component {
render() {
const n = Dimensions.get('window').width / styles.symptomBox.minHeight
return Array(Math.ceil(n)).fill(
<View
width={styles.symptomBox.minHeight}
height={0}
key={Math.random().toString()}
/>
)
const fillerBoxes = []
for (let i = 0; i < Math.ceil(n); i++) {
fillerBoxes.push(
<View
width={styles.symptomBox.minHeight}
height={0}
key={i.toString()}
/>
)
}
return fillerBoxes
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment