feat: add resistant video to resistant profile
parent
49211d8235
commit
95bae8d6d4
|
@ -4,6 +4,7 @@ import { getResistantPhotoUrl } from "../getResistantPhotoUrl";
|
||||||
import { resistants } from "../resistants";
|
import { resistants } from "../resistants";
|
||||||
import { getResistantsPageUrl } from "../getResistantsPageUrl";
|
import { getResistantsPageUrl } from "../getResistantsPageUrl";
|
||||||
import { HomeContext } from "../context/HomeContext";
|
import { HomeContext } from "../context/HomeContext";
|
||||||
|
import { AspectRatio, Center, Container } from "@mantine/core";
|
||||||
|
|
||||||
export const PageResistant = () => {
|
export const PageResistant = () => {
|
||||||
const { idResistant } = useParams();
|
const { idResistant } = useParams();
|
||||||
|
@ -142,6 +143,25 @@ export const PageResistant = () => {
|
||||||
</strong>
|
</strong>
|
||||||
<em>{resistant.mention}</em>
|
<em>{resistant.mention}</em>
|
||||||
</p>
|
</p>
|
||||||
|
{resistant.video && (
|
||||||
|
<AspectRatio
|
||||||
|
ratio={1080 / 720}
|
||||||
|
maw={600}
|
||||||
|
style={{ marginLeft: "auto", marginRight: "auto" }}
|
||||||
|
>
|
||||||
|
<iframe
|
||||||
|
src={`https://www.youtube-nocookie.com/embed/${
|
||||||
|
resistant.video.split("watch?v=")[1]
|
||||||
|
}`}
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
title="YouTube video player"
|
||||||
|
frameBorder="0"
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||||
|
allowFullScreen
|
||||||
|
></iframe>
|
||||||
|
</AspectRatio>
|
||||||
|
)}
|
||||||
<p style={{ whiteSpace: "pre-wrap" }}>
|
<p style={{ whiteSpace: "pre-wrap" }}>
|
||||||
<em>{resistant.presentation}</em>
|
<em>{resistant.presentation}</em>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue