diff --git a/src/Youtube.ts b/src/Youtube.ts index 148618f..7d2deaf 100644 --- a/src/Youtube.ts +++ b/src/Youtube.ts @@ -1,2 +1,5 @@ export const getYoutubeLink = (id: string): string => `https://www.youtube.com/watch?v=${id}`; + +export const getYoutubeEmbedLink = (id: string): string => + `https://www.youtube-nocookie.com/embed/${id}`; diff --git a/src/routes/PageResistant.tsx b/src/routes/PageResistant.tsx index dd0212a..2786b70 100644 --- a/src/routes/PageResistant.tsx +++ b/src/routes/PageResistant.tsx @@ -1,17 +1,17 @@ import { useContext } from "react"; import { useNavigate, useParams } from "react-router"; +import { AspectRatio } from "@mantine/core"; import { getResistantPhotoUrl } from "../getResistantPhotoUrl"; import { resistants } from "../resistants"; import { getResistantsPageUrl } from "../getResistantsPageUrl"; import { HomeContext } from "../context/HomeContext"; -import { AspectRatio } from "@mantine/core"; import { ExternalLink } from "../components/ExternalLink"; import { getResistantDateDeclarationMoisAnnee, getResistantDateFinMoisAnnee, isAncienResistant, - isResistantActif, } from "../Resistant"; +import { getYoutubeEmbedLink } from "../Youtube"; export const PageResistant = () => { const { idResistant } = useParams(); @@ -172,9 +172,7 @@ export const PageResistant = () => { style={{ marginLeft: "auto", marginRight: "auto" }} >