FrontEnd Bug Fix

This commit is contained in:
brausjonas
2023-05-24 16:05:21 +02:00
parent 337aea6a65
commit f42f2df078
7 changed files with 1314 additions and 5 deletions
+14
View File
@@ -1,13 +1,27 @@
import InputForm from "@/components/InputForm";
import {useRouter} from "next/router";
import Logout from "@/components/Logout";
import {useEffect} from "react";
export default function CreateSemester()
{
const router = useRouter();
let {courseName, startDate, endDate} = router.query;
useEffect(() => {
let checkURL = "http://localhost:8080/users/check?sessionid=" + localStorage.getItem("sessionid");
try {
fetch(checkURL).then(r => console.log(r))
}
catch(e)
{
router.push("/")
}
}, []);
return (
<div className={"normal-centered"}>
<Logout/>
<InputForm startDate={startDate} endDate={endDate} courseName={courseName}/>
</div>
)