From 656758a1b1b5646a184feae1a4094dcd1b85d672 Mon Sep 17 00:00:00 2001 From: liliana <liliana.sanfilippo@uni-bielefeld.de> Date: Thu, 4 Jul 2024 19:28:45 +0200 Subject: [PATCH] which html ebed works? --- src/components/Map1.tsx | 14 ++++++++++++++ src/contents/Home.tsx | 4 +++- src/contents/wiki.tsx | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/Map1.tsx b/src/components/Map1.tsx index 4f8f54b0..508d3f1e 100644 --- a/src/components/Map1.tsx +++ b/src/components/Map1.tsx @@ -12,4 +12,18 @@ return( ) } + +export function Map2(){ + const htmlFile = `<div style="min-height: 374px"> + <script type="text/javascript" defer src="src/utils/mapscript.js" charset="utf-8"> + </script> + <noscript> + <img src="https://static.igem.wiki/teams/5247/charts-maps/map1-full.png" alt="" /> + </noscript> +</div>` +return( + <div dangerouslySetInnerHTML={{ __html: htmlFile }} /> +) +} + /* min-height: "374px" */ \ No newline at end of file diff --git a/src/contents/Home.tsx b/src/contents/Home.tsx index 33cf4211..25a3b007 100644 --- a/src/contents/Home.tsx +++ b/src/contents/Home.tsx @@ -1,6 +1,6 @@ //import { Inspirations, InspirationLink } from "../components"; /* import { Sidebar } from "react-pro-sidebar"; */ -import { Map1 } from "../components/Map1"; +import { Map1, Map2 } from "../components/Map1"; export function Home() { return ( @@ -10,6 +10,8 @@ export function Home() { <h2>Wiki under construction!</h2> <hr /> <Map1></Map1> + <hr /> + <Map2></Map2> </div> </div> <div className="row"> diff --git a/src/contents/wiki.tsx b/src/contents/wiki.tsx index 86c47b05..3832cc6e 100644 --- a/src/contents/wiki.tsx +++ b/src/contents/wiki.tsx @@ -139,6 +139,10 @@ function Troubleshooting(){ const openPop = (event : React.MouseEvent<HTMLButtonElement, MouseEvent>) => {} </code> <h6>Solutions</h6> + <p>Change to: </p> + <code> + const openPop = (_event : React.MouseEvent<HTMLButtonElement, MouseEvent>) => {} + </code> </Collapsible> </div> -- GitLab