6 Netflix Series
App.js
import React from 'react';
import Netflix from './Netflix';
import Amazon from './Amazon';
const FavSere = 'netflix';
const Favourite = () =>
{
if(FavSere ==="netflix")
{
return <Netflix />
}
else
return <Amazon />
}
function App()
{
return(
<>
<h1 className="header">6 Best Netfilx Series</h1>
{/* {(FavSere ==="netflix") ? <Netflix /> : <Amazon /> } This can work on terinary when in place of the if else condition. */}
<Favourite />
</>
)
}
export default App;
Components
Netflixj.sx
import React from 'react';
import Card from './Card';
import Sdata from './Seriesdata';
const Netflix = () =>
{
return(
<>
{Sdata.map((val) => {
return(
<Card
key={val.id}
imgsrc={val.imgsrc}
category={val.category}
tname={val.tname}
linker={val.linker}
/>
);
})}
</>
);
}
export default Netflix;
Amazon.jsx
import React from 'react';
import Card from './Card';
import Sdata from './Seriesdata';
const Amazon = () =>
{
return(
<Card
key={Sdata[3].id}
imgsrc={Sdata[3].imgsrc}
category={Sdata[3].category}
tname={Sdata[3].tname}
linker={Sdata[3].linker}
/>
)
}
export default Amazon;
Seriesdata.jsx
const Sdata =
[
{
id:1,
imgsrc:"https://occ-0-2164-2773.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABTzIObVHihHjQzFME_tQ0-tpmAUB6yK3d--N8l66v2S08hgev20rlYlk-GcgPMeN9VFTXQndbWP__p8BeTfo6Cn92OFxjg_jSExB0C3JXnm2lgsnSKhbxtn2RrL8Yw.jpg?r=d9f",
category:"A Netflix Orignal Series",
tname:"STRANGER THINGS",
linker:"https://www.netflix.com/in/title/80100172",
},
{
id:2,
imgsrc:"https://occ-0-2164-2773.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABWDHOip8ApiYyLY9SZgDrw_Nc5SUAVmV_MCv6oVn1btKQkGcgkIbzTdx0BDnCZ0CWVKGnZn1X-WLjIOl9TOHJR4mgyqdyUv6n13S77Sr-WsLw6jDrP1oVdIABTUtnQ.jpg?r=dae",
category:"A Netflix Orignal Series",
tname:"IMMORTALS",
linker:"https://www.netflix.com/in/title/80100172",
},
{
id:3,
imgsrc:"https://occ-0-2164-2773.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABYEQdQtLARM7dVvqWYFcQXmuz69H0gyXuzuqsjKBKWMTKM-6uSKhCeXG0lD2lls7KL953rtlNLbUPrjMEC16-aR3uRL9J45FGBd0YMapzm6dX_ldH5wk7rsvq-GaQw.jpg?r=77d",
category:"A Netflix Orignal Series",
tname:"EL CAMINO",
linker:"https://www.netflix.com/in/title/80100172",
},
{
id:4,
imgsrc:"https://occ-0-2164-2773.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABaCA7Bp9zkhX9F9y7nvmMl5UaxTyyOxPbtEGriU_H6KXsElXIk_aQo5wB55lBO027-JiOOurJFK7oqpGXHrkyMnLieRSHR1DAGaRHh4W8LsUd4h45GyohoUhYUkcYg.jpg?r=293",
category:"A Netflix Orignal Series",
tname:"MONEY HIEST",
linker:"https://www.netflix.com/in/title/80100172",
},
{
id:5,
imgsrc:"https://occ-0-2164-2773.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABZqG2kGzcHbq2D9rIq74Lap-wjVlgR8qTcKWD_LedUEQblPHaTug5f4k4Cjc6I_rYreRd1FpULWGJ9sk2prDQazjQ76GAYYpY-V_y2STEy4oLo3SMVfahhsq17q0uA.jpg?r=5c6",
category:"A Netflix Orignal Series",
tname:"NARCOS",
linker:"https://www.netflix.com/in/title/80100172",
},
{
id:6,
imgsrc:"https://occ-0-2164-2774.1.nflxso.net/dnm/api/v6/X194eJsgWBDE2aQbaNdmCXGUP-Y/AAAABUP95EId8V71vDkYg2wUQ4JR2J9pdPDr5qUWSZYyjqC6pYIQPsVnvqes4hlNsU4Pluwa7s4H6yPn1TSYp9nxoojEE9eS.jpg?r=75c",
category:"A Netflix Orignal Series",
tname:"BETTER CALLO SAUL",
linker:"https://www.netflix.com/in/title/80100172",
},
]
export default Sdata;
f
Comments
Post a Comment