Skip to content

Commit

Permalink
refactor(webapp): remove unnecessary div
Browse files Browse the repository at this point in the history
  • Loading branch information
Torresmorah committed Nov 23, 2022
1 parent 8e68b42 commit 7b638ed
Showing 1 changed file with 41 additions and 45 deletions.
86 changes: 41 additions & 45 deletions webapp/src/components/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,51 +63,47 @@ const SearchBar = ({
}, [debouncedFilter, onChange])

return (
<div>
<div>
<Card>
<CardContent className={classes.cardContent}>
<Typography className={classes.title}>
{`${t('title')}:`}
</Typography>
<TextField
label={t('placeholder')}
variant="outlined"
className={classes.formControl}
value={filters.owner || ''}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton
onClick={handleOnClick}
edge="end"
aria-label="search"
>
<SearchOutlinedIcon />
</IconButton>
</InputAdornment>
),
}}
onKeyDown={handleOnKeyDown}
onChange={handleOnChange('owner')}
/>
<div className={classes.chipWrapper}>
{chips.map((chip, index) => (
<Chip
key={`chip-${chip.name}-${index}`}
label={t(chip.name)}
clickable
onClick={() => handleOnClickChip(chip.name)}
className={clsx({
[classes.selected]: selected === chip.name,
})}
/>
))}
</div>
</CardContent>
</Card>
</div>
</div>
<>
<Card>
<CardContent className={classes.cardContent}>
<Typography className={classes.title}>{`${t('title')}:`}</Typography>
<TextField
label={t('placeholder')}
variant="outlined"
className={classes.formControl}
value={filters.owner || ''}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton
onClick={handleOnClick}
edge="end"
aria-label="search"
>
<SearchOutlinedIcon />
</IconButton>
</InputAdornment>
),
}}
onKeyDown={handleOnKeyDown}
onChange={handleOnChange('owner')}
/>
<div className={classes.chipWrapper}>
{chips.map((chip, index) => (
<Chip
key={`chip-${chip.name}-${index}`}
label={t(chip.name)}
clickable
onClick={() => handleOnClickChip(chip.name)}
className={clsx({
[classes.selected]: selected === chip.name,
})}
/>
))}
</div>
</CardContent>
</Card>
</>
)
}

Expand Down

0 comments on commit 7b638ed

Please sign in to comment.