Last change
on this file since ac19a0c was ac19a0c, checked in by darsov2 <62809499+darsov2@…>, 9 months ago |
authContext impl, admin panel impl, search bar fixes, reservations listings impl
|
-
Property mode
set to
100644
|
File size:
916 bytes
|
Line | |
---|
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";
|
---|
5 | import {useAuth} from "../Components/Context/AuthContext";
|
---|
6 | import {Navigate} from "react-router-dom";
|
---|
7 |
|
---|
8 |
|
---|
9 | const 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 |
|
---|
36 | export default LoginPage;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.