FrontEnd Bug Fix
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user