Skip to content
Snippets Groups Projects
Commit 83e2d4cc authored by Tomáš Havlíček's avatar Tomáš Havlíček
Browse files

feat:reworked card to render from array, preparation for backend integration

parent 870a529a
No related branches found
No related tags found
No related merge requests found
...@@ -9,9 +9,27 @@ const contentStyle: React.CSSProperties = { ...@@ -9,9 +9,27 @@ const contentStyle: React.CSSProperties = {
background: "#364d79", background: "#364d79",
}; };
interface DisplayCards{
title: string;
altitle: string;
image: string
}
const cardsData: DisplayCards[] =[
{title: "Cars", altitle: "Auta", image: "https://upload.wikimedia.org/wikipedia/en/3/34/Cars_2006.jpg"},
{title: "Monster House", altitle: "V tom domě straší", image:"https://images-na.ssl-images-amazon.com/images/S/pv-target-images/9a996123e0b01f618ab2291b479f9d5034de354b2d1bb58979ddc6937588dfa8._RI_V_TTW_.jpg"},
{title: "Pokemon", altitle: "Pokémon", image:"https://www.obchod.crew.cz/im/coc/1280/0/content/629080/cover_image.1607432614.jpg"},
{title: "The Can", altitle: "Gympl", image:"https://img.csfd.cz/files/images/user/profile/162/847/162847510_91e839.jpg"},
{title: "Toy Story", altitle: "Příběh hraček", image:"https://m.media-amazon.com/images/M/MV5BMDU2ZWJlMjktMTRhMy00ZTA5LWEzNDgtYmNmZTEwZTViZWJkXkEyXkFqcGdeQXVyNDQ2OTk4MzI@._V1_.jpg"},
{title: "Smoke", altitle: "Kouř", image: "https://img.csfd.cz/files/images/user/profile/164/556/164556101_d8e43b.jpg"},
]
const Preview: React.FC = () => ( const Preview: React.FC = () => (
<div> <div>
<Space> <Space>
{cardsData.map((movie) => {
return (
<>
<Card <Card
hoverable hoverable
style={{ style={{
...@@ -19,85 +37,18 @@ const Preview: React.FC = () => ( ...@@ -19,85 +37,18 @@ const Preview: React.FC = () => (
}} }}
cover={ cover={
<img <img
alt="Cars" alt={movie.title}
src="https://upload.wikimedia.org/wikipedia/en/3/34/Cars_2006.jpg" src={movie.image}
/>
}
>
<Meta title="Cars" description="Auta" />
</Card>
<Card
hoverable
style={{
width: 240,
}}
cover={
<img
alt="Monster House"
src="https://images-na.ssl-images-amazon.com/images/S/pv-target-images/9a996123e0b01f618ab2291b479f9d5034de354b2d1bb58979ddc6937588dfa8._RI_V_TTW_.jpg"
/>
}
>
<Meta title="Monster house" description="V tom domě straší" />
</Card>
<Card
hoverable
style={{
width: 240,
}}
cover={
<img
alt="Pokemon"
src="https://www.obchod.crew.cz/im/coc/1280/0/content/629080/cover_image.1607432614.jpg"
/> />
} }
> >
<Meta title="Pokemon 3" description="Pokémon 3" /> <Meta title={movie.title} description={movie.altitle} />
</Card> </Card>
<Card </>)
hoverable })}
style={{
width: 240,
}}
cover={
<img
alt="Gympl"
src="https://img.csfd.cz/files/images/user/profile/162/847/162847510_91e839.jpg"
/>
}
>
<Meta title="The Can" description="Gympl" />
</Card>
<Card
hoverable
style={{
width: 240,
}}
cover={
<img
alt="Toy Story"
src="https://m.media-amazon.com/images/M/MV5BMDU2ZWJlMjktMTRhMy00ZTA5LWEzNDgtYmNmZTEwZTViZWJkXkEyXkFqcGdeQXVyNDQ2OTk4MzI@._V1_.jpg"
/>
}
>
<Meta title="Toy Story" description="www.instagram.com" />
</Card>
<Card
hoverable
style={{
width: 240,
}}
cover={
<img
alt="Kour"
src="https://img.csfd.cz/files/images/user/profile/164/556/164556101_d8e43b.jpg"
/>
}
>
<Meta title="Smoke" description="Kouř" />
</Card>
</Space>
</Space>
<Carousel autoplay> <Carousel autoplay>
<div> <div>
<h3 style={contentStyle}>Avengers: Infinity War</h3> <h3 style={contentStyle}>Avengers: Infinity War</h3>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment