Skip to content

Commit 4c1beed

Browse files
author
Haralan Dobrev
committed
Change homepage video with YouTube
1 parent daefc65 commit 4c1beed

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/components/front/pages/Home.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Helmet from 'react-helmet';
77
import styled from 'styled-components';
88

99
import { Wrapper, MainContent, GreenLine } from '../Front';
10-
import { VideoWrapper } from './Videos';
10+
import { VideoWrapper, YouTubeVideoEmbed } from './Videos';
1111

1212
import { MOBILE_WIDTH } from '../Style';
1313

@@ -230,9 +230,7 @@ export default props => {
230230
</HomeButtonWrapper>
231231
<hr/>
232232
<h2>Видеа от кампанията</h2>
233-
<VideoWrapper>
234-
<iframe src="https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2F%2Fwww.facebook.com%2Fdabulgaria.bg%2Fvideos%2F363350401696989%2F&show_text=false&width=560" scrolling="no" frameBorder="0" allowFullScreen={true} allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
235-
</VideoWrapper>
233+
<YouTubeVideoEmbed videoId={"J_B0525_hcs"} />
236234
<HomeButtonWrapper>
237235
<Link to='/videos'><HomeButton>Виж още видеа</HomeButton></Link>
238236
</HomeButtonWrapper>

src/components/front/pages/Videos.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export const VideoWrapper = styled.div`
2525
}
2626
`;
2727

28-
const EmbedYouTubeVideo = props => {
29-
const iframeSrc = `https://www.youtube.com/embed/${props.videoId}`;
28+
export const YouTubeVideoEmbed = ({ videoId }) => {
29+
const iframeSrc = `https://www.youtube.com/embed/${videoId}`;
3030

3131
return(
3232
<VideoWrapper>
@@ -61,17 +61,17 @@ export default () => {
6161
<MainContent>
6262
<h1>Видеа от кампанията</h1>
6363
<hr/>
64-
<EmbedYouTubeVideo videoId={"JBgplUhCPCQ"} />
65-
<EmbedYouTubeVideo videoId={"eOEUrun-I3M"} />
66-
<EmbedYouTubeVideo videoId={"CoAk-Lu74rM"} />
67-
<EmbedYouTubeVideo videoId={"-1zSi5tq82o"} />
68-
<EmbedYouTubeVideo videoId={"yFS9Uv54R34"} />
69-
<EmbedYouTubeVideo videoId={"nxM0fnUPDx4"} />
70-
<EmbedYouTubeVideo videoId={"-L0y6Ih8id8"} />
71-
<EmbedYouTubeVideo videoId={"apAuVIu53Gg"} />
72-
<EmbedYouTubeVideo videoId={"xgIZ8uFmmpY"} />
73-
<EmbedYouTubeVideo videoId={"Q4Ijwoy2WR8"} />
74-
<EmbedYouTubeVideo videoId={"J_B0525_hcs"} />
64+
<YouTubeVideoEmbed videoId={"JBgplUhCPCQ"} />
65+
<YouTubeVideoEmbed videoId={"eOEUrun-I3M"} />
66+
<YouTubeVideoEmbed videoId={"CoAk-Lu74rM"} />
67+
<YouTubeVideoEmbed videoId={"-1zSi5tq82o"} />
68+
<YouTubeVideoEmbed videoId={"yFS9Uv54R34"} />
69+
<YouTubeVideoEmbed videoId={"nxM0fnUPDx4"} />
70+
<YouTubeVideoEmbed videoId={"-L0y6Ih8id8"} />
71+
<YouTubeVideoEmbed videoId={"apAuVIu53Gg"} />
72+
<YouTubeVideoEmbed videoId={"xgIZ8uFmmpY"} />
73+
<YouTubeVideoEmbed videoId={"Q4Ijwoy2WR8"} />
74+
<YouTubeVideoEmbed videoId={"J_B0525_hcs"} />
7575
</MainContent>
7676
</Wrapper>
7777
)

0 commit comments

Comments
 (0)