From 1b3a300173c4531bebf3b88966a1fec64d276440 Mon Sep 17 00:00:00 2001 From: Alberto-Duarte Date: Fri, 21 Apr 2023 13:51:46 +0100 Subject: First commit --- src/pages/browse/index.tsx | 100 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 src/pages/browse/index.tsx (limited to 'src/pages/browse') diff --git a/src/pages/browse/index.tsx b/src/pages/browse/index.tsx new file mode 100644 index 0000000..1b85fd3 --- /dev/null +++ b/src/pages/browse/index.tsx @@ -0,0 +1,100 @@ +import { link } from 'fs' +import Link from 'next/link' +import { BellIcon, MagnifyingGlassIcon, PlayIcon, InformationCircleIcon, ArrowSmallDownIcon} from '@heroicons/react/24/solid' +import { useEffect, useState } from 'react' +import requests from '../../../services/requests' +// import NetflixLogo from '../../../public/images/netflix_logo.svg' +const baseURL ='https://api.themoviedb.org/3/' +const imageURL = 'https://image.tmdb.org/t/p/original' + +export default function Home() { + const [heroMovie, setHeroMovie] = useState() + useEffect(() => { + fetch(`${baseURL}${requests.fetchTopRated}`).then(res => res.json()).then((data) => { + console.log('MOVIES', data.results[0]) + setHeroMovie(data.results[0]) + }) + }, []) + return ( +
+
+
+ SVG image + Home + TV Shows + Movies + News & Popular + My List + Browse by Language +
+
+ + Kids + +
+ +
+
+
+
+
+ SVG image +

MOVIES

+
+
+ {heroMovie?.original_title} +
+
+ SVG image +

#1 in TV Shows Today

+
+
+

+ {heroMovie?.overview} +

+
+
+ + +
+
+
+

Popular on Netflix

+
+ { + MOVIES.map((movie, index) => ( +
+ + +
+ ))} +
+
+
+
+
+ ) +} + + + +const MOVIES = [ + { + link:'../images/Card.png', + }, + { + link:'../images/Card.png', + }, + { + link:'../images/Card.png', + }, + { + link:'../images/Card.png', + }, + { + link:'../images/Card.png', + }, + { + link:'../images/Card.png', + } +] \ No newline at end of file -- cgit v1.2.3-54-g00ecf