From 416003983380a95018aa915d5d5d2b48b82c4b21 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Sat, 9 Sep 2023 01:36:41 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20vid=C3=A9os=20ne=20marche=20plus=20sur?= =?UTF-8?q?=20les=20pages=20r=C3=A9sistants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Youtube.ts | 3 +++ src/routes/PageResistant.tsx | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) 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" }} >