From eb5987108e36136bc079873499f95567b9051029 Mon Sep 17 00:00:00 2001
From: Alberto Mac <alberto.duarte.delgado@pwc.com>
Date: Mon, 26 Aug 2024 18:52:46 +0100
Subject: revision, and minor fixes

---
 app/browse/page.tsx | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

(limited to 'app/browse/page.tsx')

diff --git a/app/browse/page.tsx b/app/browse/page.tsx
index 7806738..461586c 100644
--- a/app/browse/page.tsx
+++ b/app/browse/page.tsx
@@ -14,7 +14,7 @@ import { signOut } from 'firebase/auth';
 import { AuthContext } from '../components/AuthContext'
 
 // import NetflixLogo from '../../../public/images/netflix_logo.svg'
-const baseURL ='https://api.themoviedb.org/3/'
+const baseURL ='https://api.themoviedb.org/3'
 const imageURL = 'https://image.tmdb.org/t/p/original'
 
 const Home = () => {
@@ -59,7 +59,11 @@ const Home = () => {
 
   useEffect(() => {
     fetch(`${baseURL}${requests.fetchTopRated}`).then(res => res.json()).then((data) => {
-      setHeroMovie(data.results[3])
+      setHeroMovie(data.results[0]);
+      console.log('toprated');
+      console.log(data.results[0]);
+      console.log(imageURL);
+      console.log(heroMovie?.backdrop_path);
     })
   }, [])
   useEffect(() => {
@@ -91,9 +95,9 @@ const Home = () => {
           <a className='text-white'>Kids</a>
           <BellIcon className='h-4 w-4'/>
           <div className='h-8 w-8'>
-              <Link href='../' className="w-[128px] h-[128px] rounded-xl overflow-hidden bg-white">
-                <img src='https://avatars.dicebear.com/api/male/124.svg' alt=""/>
-              </Link>
+      <Link href='../' className="w-[128px] h-[128px] rounded-xl overflow-hidden bg-white">
+      <img src='https://api.dicebear.com/9.x/adventurer/svg?seed=alberto' alt="User Avatar"/>
+      </Link>
           </div>
               <ArrowSmallDownIcon className='h-4 w-4 cursor-pointer' onClick={logoutUser}/>
         </div>
@@ -105,7 +109,7 @@ const Home = () => {
           </div>
           <div className='h-fit text-[3rem]'>
               {heroMovie?.original_title}
-          </div>
+    </div>
           <div className='flex items-center'>
             <img className='scale-[45%]' src="../images/Top10.svg" alt="SVG image"/> 
             <h2 className='font-bold'>#1 in TV Shows Today</h2>
@@ -150,4 +154,4 @@ const Home = () => {
     </div>
   )
 }
-export default Home;
\ No newline at end of file
+export default Home;
-- 
cgit v1.2.3-54-g00ecf

