This is my code and i cant take the data movie.title Objects getting logged twice in the console , while inspect and cant add take the data and store in the state "movie" i couldn't find any solution .The console screenshot
import React, { useEffect, useState } from 'react'
import axios from "../../axios"
import {API_KEY} from "../../Constants/constants"
import "./Banner.css"
function Banner() {
const [movie, setMovie] = useState()
useEffect(()=>{
axios.get(`trending/all/week?api_key=${API_KEY}&language=en-US`).then((Response)=>{
console.log(Response.data.results[0]);
setMovie(Response.data.results[0])
})
},[])
return (
<div className="banner">
<div className="content">
***<h1>{movie.title}</h1>***
<div className="banner-buttons">
<button className="button">Play</button>
<button className="button">More-info</button>
</div>
<h1 className="description">Part 4 (also referred to as the second part of season 2) Of Netflix's Money Heist consists of 8 episodes. It was released on April 3, 2020. Money Heist Part</h1>
</div>
<div className="fade-bottom"></div>
</div>
)
}
export default Banner
[1]: https://i.stack.imgur.com/JWAQl.png