Refactor MovieCard props in SearchList: streamline prop passing by spreading result object and joining genre_ids for improved readability and maintainability.
This commit is contained in:
parent
403f394924
commit
83e931c27f
|
|
@ -47,14 +47,10 @@ export const SearchList: FC<Props> = ({ query }) => {
|
|||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 mt-8">
|
||||
{results?.map((result) => (
|
||||
<MovieCard
|
||||
layout="zeus"
|
||||
key={result.id}
|
||||
id={result.id}
|
||||
title={result.title}
|
||||
releaseDate={result.release_date}
|
||||
popularity={result.popularity}
|
||||
overview={result.overview}
|
||||
imagePath={result.poster_path}
|
||||
layout="zeus"
|
||||
{...result}
|
||||
genre_ids={result.genre_ids.join(",")}
|
||||
seen={false}
|
||||
favorite={false}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue