forked from qdrant/demo-midlibrary-explorer-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Results.jsx
41 lines (38 loc) · 1.02 KB
/
Results.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from "react";
import PropTypes from "prop-types";
import { ImageCard } from "@/components/ImageCard.jsx";
import { Grid } from "@mui/material";
const Results = ({ exploreItems, likeItem }) => {
return (
<Grid container spacing={1}>
{exploreItems.map((item) => (
<Grid item xs={6} md={3} key={item.id + item.name}>
<ImageCard
imgObject={item}
showInfo={true}
onClick={() => likeItem(item)}
alt={item.name}
tooltip={"Find similar"}
withActions={true}
sx={{
".MuiCardContent-root": {
py: 2,
px: 0,
textAlign: "left",
fontSize: "0.5rem",
a: {
display: "inline-block",
},
},
}}
/>
</Grid>
))}
</Grid>
);
};
Results.propTypes = {
exploreItems: PropTypes.array.isRequired,
likeItem: PropTypes.func.isRequired,
};
export default Results;