source: frontend/src/Pages/LoginPage.js@ e6c2521

Last change on this file since e6c2521 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

images upload/download impl, other fixes

  • Property mode set to 100644
File size: 916 bytes
Line 
1import React from "react";
2import LoginForm from "../Components/Login/LoginForm";
3import { Container } from "react-bootstrap";
4import Navigation from "../Components/Layout/Navbar/Navigation";
5import {useAuth} from "../Components/Context/AuthContext";
6import {Navigate} from "react-router-dom";
7
8
9const LoginPage = () => {
10 document.body.style.backgroundColor = "#159895";
11 document.body.style.marginTop = "auto";
12 document.body.style.marginBottom = "auto";
13
14 const Auth = useAuth();
15 const isLoggedIn = Auth.userIsAuthenticated();
16
17 if (isLoggedIn) {
18 return <Navigate to={'/home'}/>
19 }
20
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.