source: frontend/src/Pages/LoginPage.js

Last change on this file was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 5 months ago

prefinal fixes

  • Property mode set to 100644
File size: 916 bytes
RevLine 
[e6c2521]1import React from "react";
2import LoginForm from "../Components/Login/LoginForm";
3import { Container } from "react-bootstrap";
4import Navigation from "../Components/Layout/Navbar/Navigation";
[07f4e8b]5import {useAuth} from "../Components/Context/AuthContext";
6import {Navigate} from "react-router-dom";
7
[e6c2521]8
9const LoginPage = () => {
10 document.body.style.backgroundColor = "#159895";
11 document.body.style.marginTop = "auto";
12 document.body.style.marginBottom = "auto";
[07f4e8b]13
14 const Auth = useAuth();
15 const isLoggedIn = Auth.userIsAuthenticated();
16
17 if (isLoggedIn) {
18 return <Navigate to={'/home'}/>
19 }
20
[e6c2521]21 return (
22 <>
23 {" "}
24 <Container fluid className="px-0">
25 <Navigation />
26 </Container>
27 <Container className="mt-5">
28 <Container style={{ width: "40%" }}>
29 <LoginForm></LoginForm>
30 </Container>
31 </Container>
32 </>
33 );
34};
35
36export default LoginPage;
Note: See TracBrowser for help on using the repository browser.