summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-11-06 00:27:00 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-11-06 00:27:00 +0900
commitca146ee19fde17f92bdcafdbf79782bc1558001b (patch)
treed5eb422f0103f1256bf3e19cf3d54fa06f5556e2
parenta821ce874b7e7cd989b3e4e30e1d33bad1163a3f (diff)
Fix some react warnings
-rw-r--r--src/App.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/App.js b/src/App.js
index f5637e4..5553a35 100644
--- a/src/App.js
+++ b/src/App.js
@@ -197,8 +197,8 @@ function StoreCarousel(props) {
totalSlides={props.data.length + skeletons.length}>
<div className={classes.controls}>
<Slider>
- {props.data.map((item, index) => <Slide index={index}><StoreItem className={classes.tile} data={item}/></Slide>)}
- {skeletons.length ? skeletons.map((item, index) => <Slide index={index}><StoreItemSkeleton className={classes.tile}/></Slide>) : null}
+ {props.data.map((item, index) => <Slide index={index} key={index}><StoreItem className={classes.tile} data={item}/></Slide>)}
+ {skeletons.length ? skeletons.map((item, index) => <Slide index={index} key={index}><StoreItemSkeleton className={classes.tile}/></Slide>) : null}
</Slider>
<IconButton size='small' aria-label='previous' component={ButtonBack} className={classes.prev}>
<NavigateBeforeIcon/>
@@ -310,14 +310,14 @@ function ItemSearch(props) {
<FormGroup row style={{marginLeft: 18}}>
{categories.map(cat =>
<FormControlLabel control={<Checkbox checked={true} name={cat}/>}
- label={t(cat)}/>)}
+ key={cat} label={t(cat)}/>)}
</FormGroup>
<Typography>{t('Audience')}</Typography>
<Divider variant="middle"/>
<FormGroup row style={{marginLeft: 18}}>
{audience.map(cat =>
<FormControlLabel control={<Checkbox checked={cat.value} name={cat.key}/>}
- label={t(cat.key)}/>)}
+ key={cat.key} label={t(cat.key)}/>)}
</FormGroup>
</Paper>
</Collapse>