diff --git a/src/components/EmbeddedYoutube.tsx b/src/components/EmbeddedYoutube.tsx index c4a6089..eb94270 100644 --- a/src/components/EmbeddedYoutube.tsx +++ b/src/components/EmbeddedYoutube.tsx @@ -1,10 +1,11 @@ -import { ReactNode } from "react"; +import { IframeHTMLAttributes } from "react"; interface Props { youtubeId: string; width: string; height: string; onClick: () => void; + style: IframeHTMLAttributes["style"]; } export const EmbeddedYoutube = ({ @@ -12,6 +13,7 @@ export const EmbeddedYoutube = ({ width, height, onClick, + style, }: Props) => (
); diff --git a/src/routes/Liste/Map/PopupContent.tsx b/src/routes/Liste/Map/PopupContent.tsx index a1db4c3..d9ad04d 100644 --- a/src/routes/Liste/Map/PopupContent.tsx +++ b/src/routes/Liste/Map/PopupContent.tsx @@ -5,6 +5,7 @@ import { getResistantPhotoUrl } from "../../../getResistantPhotoUrl"; import { HomeContext } from "../../../context/HomeContext"; import { getResistantPageUrl } from "../../../getResistantPageUrl"; import { getResistantGrayscaleRule } from "../../../style/getResistantGrayscaleRule"; +import { EmbeddedYoutube } from "../../../components/EmbeddedYoutube"; export const PopupContent = ({ resistant }: { resistant: Resistant }) => { const navigate = useNavigate(); @@ -19,16 +20,31 @@ export const PopupContent = ({ resistant }: { resistant: Resistant }) => { : navigate(resistant.id) } > - {resistant.noms} + {resistant.video ? ( + {}} + style={{ + float: "left", + maxHeight: "15em", + marginRight: "1em", + paddingBottom: "3em", + }} + /> + ) : ( + {resistant.noms} + )} {resistant.noms}
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Parent(s) de {resistant.enfants}