Add SearchResults parent component
This commit is contained in:
parent
e47510f912
commit
1ab1d204af
25
fe/src/components/search/SearchResults.tsx
Normal file
25
fe/src/components/search/SearchResults.tsx
Normal 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;
|
Loading…
Reference in a new issue