diff --git a/src/App.tsx b/src/App.tsx index a6df8e3..2e1026c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,7 @@ import { Sidebar } from './objects/sidebar' import { Movie } from './objects/movie-wall' import CrossfadeImage from 'react-crossfade-image' import { WatchProviders } from './objects/whereToWatch' +import useWindowDimensions from './hooks/useWindowDimensions' export type Config = { language: string, @@ -64,7 +65,11 @@ function App() { minHeight: "100%", aspectRatio: "16/9" } + + const { width } = useWindowDimensions() + function setMoviesHandler(movies: Movie[]) { + } return ( @@ -73,11 +78,10 @@ function App() { -
- +
+ WIDTH: {width}
- :
clickHandler()}> - hello -
+ :
clickHandler()}>
} {hasError ??
⚠️
} {similarMoviesAvailable ? "" : "No hay data suficiente para darte pelílculas relacionadas."} -

{movie.overview === null ? "Loading" +

{movie.overview === null ? "Loading" : movie.overview === "" ? apology : movie.overview}