From 3258651e991f437e298782f6a2b16619286771d5 Mon Sep 17 00:00:00 2001 From: liliana <liliana.sanfilippo@uni-bielefeld.de> Date: Fri, 5 Jul 2024 19:00:20 +0200 Subject: [PATCH] Hello36 --- src/App/App.tsx | 5 +++-- src/components/Map1.tsx | 1 + src/contents/Home.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/App/App.tsx b/src/App/App.tsx index a7ad64de..450bb927 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -12,9 +12,10 @@ import { useEffect} from "react"; import Villbuttonrow from "../components/Villagebuttons.tsx"; /* import Sidebar from "../components/Sidebar.tsx"; */ import "../utils/highlight.js"; +"../statics/mapscript.js" const App = () => { - useEffect(() => { + /* useEffect(() => { const script = document.createElement('script'); script.src = "../statics/mapscript.js"; script.async = true; @@ -22,7 +23,7 @@ const App = () => { return () => { document.body.removeChild(script); } - }, []); + }, []); */ const pathMapping = getPathMapping(); const currentPath = location.pathname diff --git a/src/components/Map1.tsx b/src/components/Map1.tsx index 1695a3a3..39f18235 100644 --- a/src/components/Map1.tsx +++ b/src/components/Map1.tsx @@ -1,6 +1,7 @@ import InnerHTML from 'dangerously-set-html-content' /* import { useEffect } from 'react' */ + export function Map1(){ const htmlFile = `<div style="min-height: 374px"> <script type="text/javascript" defer src="src/statics/mapscript.js" charset="utf-8"> diff --git a/src/contents/Home.tsx b/src/contents/Home.tsx index fd0fdbb1..fb7622e2 100644 --- a/src/contents/Home.tsx +++ b/src/contents/Home.tsx @@ -11,7 +11,7 @@ export function Home() { <hr/> <Map1/> <hr /> - Hello35 + Hello36 </div> </div> <div className="row"> -- GitLab