diff --git a/src/pages/TopFlix.tsx b/src/pages/TopFlix.tsx index c30404d9..f85cb850 100644 --- a/src/pages/TopFlix.tsx +++ b/src/pages/TopFlix.tsx @@ -182,6 +182,7 @@ export function TopFlix() { const type = isShowOrMovie(item.tmdbFullId); // const poster = await getPoster(tmdbId, type === "movie" ? TMDBContentTypes.MOVIE : TMDBContentTypes.TV); const poster = ""; + console.log(poster); const media: MediaItem = { id: tmdbId, title: item.title, diff --git a/src/setup/Layout.tsx b/src/setup/Layout.tsx index 8f120e41..8c677a6e 100644 --- a/src/setup/Layout.tsx +++ b/src/setup/Layout.tsx @@ -29,6 +29,7 @@ export function Layout(props: { children: ReactNode }) { const [extensionState, setExtensionState] = useState("unknown"); const [loading, setLoading] = useState(true); + const [isMobile, setIsMobile] = useState(false); useEffect(() => { let isMounted = true; @@ -40,8 +41,18 @@ export function Layout(props: { children: ReactNode }) { } }); + const mediaQuery = window.matchMedia("(max-width: 768px)"); // Adjust the max-width as per your needs + setIsMobile(mediaQuery.matches); + + const handleResize = () => { + setIsMobile(mediaQuery.matches); + }; + + mediaQuery.addListener(handleResize); + return () => { isMounted = false; + mediaQuery.removeListener(handleResize); }; }, []); @@ -53,9 +64,11 @@ export function Layout(props: { children: ReactNode }) { return (
-
- -
+ {!isMobile && ( +
+ +
+ )}