move sidebar

This commit is contained in:
andrzej 2024-05-08 16:50:27 +02:00
parent d0bc6faec0
commit b9f2833283
2 changed files with 3 additions and 5 deletions

View File

@ -5,11 +5,9 @@ export interface SidebarProps extends React.ComponentPropsWithRef<"div"> {
movie: Movie; movie: Movie;
} }
export function Sidebar({ movie }: SidebarProps) { export function Sidebar({ movie }: SidebarProps) {
const style = { return <div id="sidebar">
backgroundImage: tmdb.makeBgImgUrl(movie.backdrop_path ?? "")
}
return <div id="sidebar" style={style}>
<h1>{movie?.title ?? "loading"}</h1> <h1>{movie?.title ?? "loading"}</h1>
<img src={tmdb.makeImgUrl(movie.poster_path ?? "")} />
<p>{movie?.overview ?? "loading"}</p> <p>{movie?.overview ?? "loading"}</p>
</div> </div>

View File

@ -51,7 +51,7 @@ export default {
return e.poster_path return e.poster_path
}) })
array.splice(19) array.splice(19)
array.unshift(movie) // array.unshift(movie)
callback(array) callback(array)
return true return true
} else { } else {