Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed May 6, 2024
1 parent 7102084 commit 6cd639d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const Home = () => {
<div className='text-center'>
<h3>Outfit preview</h3>
<div className='col-4 offset-4'>
{clothes && (clothes.map((clothes, i) => (
{Array.isArray(clothes) && (clothes.map((clothes, i) => (
<img key={i} src={`data:image/jpeg;base64,${clothes.image}`} alt="" className="custom-carousel-image" />
)))}
</div>
Expand All @@ -130,7 +130,7 @@ const Home = () => {
<Col sm={10}>
<Form.Select onChange={(e) => setCategory(e.target.value)}
defaultValue="Select a category...">
{ categories && (categories.map((category, i) => (
{ Array.isArray(categories) && (categories.map((category, i) => (
<option key={i}>{category}</option>
)))}
</Form.Select>
Expand Down

0 comments on commit 6cd639d

Please sign in to comment.