im trying to do a Netflix clone app and i have an issue. Im watching a video while doing it and im doing what i see in the video.
I have added a banner image with this code.
Code :
function Banner() {
return (
<header
className="banner"
style={{
backgroundSize: "cover",
backgroundImage: 'url("https://thelesfilms.files.wordpress.com/2016/06/netflix-banner.jpg?w=640")',
backgroundPosition: "center center",
}}>
</header>
);
}
CSS :
.banner {
height: 200px;
position: relative;
}
When the guy in the video writes the same code, it works correctly and one image appears as expected. When i do the same thing, there are double image and i dont understand why. (I didnt return Banner function 2 times in HomeScreen.js.)