Add SearchResults parent component

This commit is contained in:
Nikhil Nawgiri 2024-10-27 12:48:07 +01:00
parent e47510f912
commit 1ab1d204af

View file

@ -0,0 +1,25 @@
interface SearchResultsProps {
items: object[],
}
const SearchResults = ({ items }: SearchResultsProps) => (
<div className="search-results-wrapper">
{items.length > 0 && items.map((item) => {
const { Title, Poster, imdbID, Year, Type } = item;
return (
<div
// title={Title}
// image={Poster}
// imdbId={imdbID}
// key={Poster}
// year={Year}
// type={Type}
>
{Title} - {imdbID}
</div>
);
})}
</div>
);
export default SearchResults;