Skip to content

Commit

Permalink
SoundCloud, can't show without consent
Browse files Browse the repository at this point in the history
  • Loading branch information
haslo committed Oct 8, 2024
1 parent 48c5ba5 commit 86f3bee
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/pages/music/SoundCloudIFrame.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Container} from "@mui/material";
import {Container, Typography, Button, Grid, Card, CardContent} from "@mui/material";
import * as React from "react";

export function SoundCloudIFrame({newestContentId}) {
if (newestContentId !== null && newestContentId !== undefined) {
Expand All @@ -11,8 +12,33 @@ export function SoundCloudIFrame({newestContentId}) {

return (
<Container fixed style={{marginTop: '50px'}}>
<div dangerouslySetInnerHTML={{__html: iframeHtml}}/>
<div className="cookieconsent-optin-marketing">
<div dangerouslySetInnerHTML={{__html: iframeHtml}}/>
</div>
<div className="cookieconsent-optout-marketing">
<Grid item xs={12} sm={12} md={12} lg={12}>
<Card sx={{paddingX: 1, marginTop: '10px', marginBottom: '25px'}}>
<CardContent>
<Typography variant='h4' sx={{textAlign: 'center', marginBottom: '20px'}}>
Newest track goes here..
</Typography> <Typography variant="body1" gutterBottom>
To listen to the music, please accept marketing cookies. This allows the website to embed the SoundCloud player.
</Typography>
<Button
variant="contained"
color="primary"
fullWidth
sx={{marginTop: '20px'}}
onClick={() => window.Cookiebot.renew()}
>
Update Cookie Preferences
</Button>
</CardContent>
</Card>
</Grid>
</div>
</Container>
);
)
;
}
}

0 comments on commit 86f3bee

Please sign in to comment.