import { useEffect } from "react"; import { useLocation } from "react-router-dom"; import { openFromOtherPage } from "../components/Buttons"; import { H2 } from "../components/headings"; export function Impressum() { const location = useLocation(); useEffect(() => { const params = new URLSearchParams(location.search); const collapseId = params.get('collapseId'); const tabId = params.get('tab'); // Scroll to the section specified by collapseId if (collapseId) { const collapseElement = document.getElementById(collapseId); if (collapseElement) { const elementTop = collapseElement.getBoundingClientRect().top + window.pageYOffset; const offset = window.innerHeight / 2 - collapseElement.offsetHeight / 2; const scrollPosition = elementTop - offset; window.scrollTo({ top: scrollPosition, behavior: 'smooth', }); } } // Open the tab specified by tabId if (tabId) { openFromOtherPage(tabId)({ currentTarget: document.getElementById(tabId)! }); } }, [location.search]); return ( <> <div className="row"> <div className="col"> <H2 id="impressum" text="Impressum"/> <hr /> </div> </div> <div className="row"> <div className="col"> <p> <h3><b>iGEM Team Bielefeld CeBiTec 2024</b></h3> <b>Responsible for the content according to § 5 TMG and according to § 55 Abs. 2 RStV Germany:</b><br /> Jörn Kalinowski<br /> Universitätsstraße 25<br /> 33615 Bielefeld<br /> <br /> <b>Contact</b><br /> E-mail: team2024@igem-bielefeld.de<br /> <br /> <b>Supervisory Authority</b><br /> Bielefeld University - Center for Biotechnology (CeBiTec) </p> </div> </div> </> ); }