diff --git a/web/package.json b/web/package.json index 03c857c..2946d02 100644 --- a/web/package.json +++ b/web/package.json @@ -20,11 +20,11 @@ }, "devDependencies": { "typescript": "^5.8.2", - "@types/node": "^20.17.24", - "@types/react": "^19.0.11", + "@types/node": "^20.17.27", + "@types/react": "^19.0.12", "@types/react-dom": "^19.0.4", - "eslint": "^9.22.0", + "eslint": "^9.23.0", "eslint-config-next": "15.1.0", - "@eslint/eslintrc": "^3.3.0" + "@eslint/eslintrc": "^3.3.1" } } diff --git a/web/src/app/_components/loginpage.tsx b/web/src/app/_components/loginpage.tsx new file mode 100644 index 0000000..7150d80 --- /dev/null +++ b/web/src/app/_components/loginpage.tsx @@ -0,0 +1,24 @@ +"use client" + +import { Button } from "@mui/material" +import "./styles/loginpage.scss" + +let logged_in: boolean = false + +function login() { + //This would instead send you to the auth page + window.location.reload() +} + +export default function LoginPage() { + return <main className="login-page"> + <section> + <h1>Login to continue</h1> + <Button variant="outlined" className="login-button" onClick={login}>Login</Button> + </section> + </main> +} + +export { + logged_in +} \ No newline at end of file diff --git a/web/src/app/_components/styles/loginpage.scss b/web/src/app/_components/styles/loginpage.scss new file mode 100644 index 0000000..3797ed8 --- /dev/null +++ b/web/src/app/_components/styles/loginpage.scss @@ -0,0 +1,21 @@ +.login-page { + width: 100vw; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + + .login-button { + margin-inline: auto; + width: 70%; + height: 40px; + } + + h1 { + font-size: 2.3rem; + } + + section { + display: grid; + } +} \ No newline at end of file diff --git a/web/src/app/_components/webpage.tsx b/web/src/app/_components/webpage.tsx index 6119987..0dbd458 100644 --- a/web/src/app/_components/webpage.tsx +++ b/web/src/app/_components/webpage.tsx @@ -1,8 +1,16 @@ +"use client" + import Header from "./header"; +import LoginPage from "./loginpage" + +import { logged_in } from "./loginpage"; export default function Webpage({children}: Readonly<{children?: React.ReactNode}>) { - return (<> - <Header/> - {children} - </>) + if (logged_in) { + return <> + <Header/> + {children} + </> + } + return <LoginPage/> } \ No newline at end of file