Last change
on this file since efaa053 was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 8 months ago |
prefinal fixes
|
-
Property mode
set to
100644
|
File size:
916 bytes
|
Rev | Line | |
---|
[e6c2521] | 1 | import React from "react";
|
---|
| 2 | import LoginForm from "../Components/Login/LoginForm";
|
---|
| 3 | import { Container } from "react-bootstrap";
|
---|
| 4 | import Navigation from "../Components/Layout/Navbar/Navigation";
|
---|
[07f4e8b] | 5 | import {useAuth} from "../Components/Context/AuthContext";
|
---|
| 6 | import {Navigate} from "react-router-dom";
|
---|
| 7 |
|
---|
[e6c2521] | 8 |
|
---|
| 9 | const 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 |
|
---|
| 36 | export default LoginPage;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.