Skip to content
Snippets Groups Projects
Commit 3ebad15e authored by Simon Künzel's avatar Simon Künzel
Browse files

Remove button to old page

parent 4ff2dbc6
Branches
Tags v2.0.1
No related merge requests found
Pipeline #7598 passed
import Link from "next/link";
import type React from "react";
import { MouseEvent, useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { useRouter } from "next/router";
import { DropdownButton } from "react-bootstrap";
import Collapse from "react-bootstrap/Collapse";
......@@ -147,16 +147,6 @@ function NavBar({ status }: { status?: GetStatusResponse }) {
const toggleNavbar = () => {
setNavbarOpen((o) => !o);
};
const switchToOldSite = (event: MouseEvent) => {
if (window.location.pathname.indexOf(basePath) !== -1) {
event.preventDefault();
let newPath = window.location.pathname;
if (!newPath.startsWith("/")) newPath = "/" + newPath;
window.location.href = "https://video.fsmpi.rwth-aachen.de" + newPath;
}
};
const isHome = useRouter().pathname === "/";
return (
......@@ -197,19 +187,6 @@ function NavBar({ status }: { status?: GetStatusResponse }) {
url="/feedback"
className="flex-grow-1 text-center"
/>
<a
className={
"nav-link p-2 rounded flex-grow-1 text-center d-flex align-items-center justify-content-center"
}
href={"/"}
onClick={switchToOldSite}
style={{ color: "#c66" }}
>
<span
aria-hidden="true"
className={"me-1 bi bi-arrow-down-left-square"}
></span>
</a>
</div>
<button
......@@ -280,18 +257,6 @@ function NavBar({ status }: { status?: GetStatusResponse }) {
Feedback
</NavBarIcon>
</li>
<a
className={"nav-link p-2 rounded mx-1"}
href={"https://video.fsmpi.rwth-aachen.de"}
onClick={switchToOldSite}
style={{ color: "#c66" }}
>
<span
aria-hidden="true"
className={"me-1 bi bi-arrow-down-left-square"}
></span>
Zur alten Seite
</a>
</ul>
<div className="flex-fill d-none d-lg-block" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment