Commit a5732d6f authored by Daniel Puchala's avatar Daniel Puchala
Browse files

fix: error during previous refactoring

parent a98ca0cd
......@@ -58,7 +58,7 @@ export const Movie = () => {
{movie.genres &&
<p><b>Genres: </b>
{movie.genres.slice(0, -1).map((genre: any) => `${genre}, `)}
{`${movie.genres.at(-1)}`}
{movie.genres.slice(-1).map((genre: any) => `${genre}`)}
</p>
}
<p><b>Duration: </b>{formatDuration(movie.duration)}</p>
......@@ -67,7 +67,7 @@ export const Movie = () => {
{movie.actors &&
<p className="text-xl"><b>Actors: </b>
{movie.actors.slice(0, -1).map((actor: any) => `${actor.name}, `)}
{`${movie.actors.at(-1).name}`}
{movie.actors.slice(-1).map((actor: any) => `${actor.name}`)}
</p>
}
<button className="w-max p-4 self-center bg-blue-600 border-2 rounded-3xl border-slate-900"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment