Skip to content
Snippets Groups Projects
Commit 72a11a4b authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Merge branch 'feature/authorization/curry' into 'dev'

Feature/authorization/curry

See merge request !53
parents 6f4925ee d3a527bb
No related branches found
No related tags found
3 merge requests!56Refined auth flow and new website pages.,!53Feature/authorization/curry,!52Change folder structure and fix auth flow.
Pipeline #12486 passed
Showing
with 24 additions and 109 deletions
...@@ -2,9 +2,9 @@ import React, { FC } from 'react'; ...@@ -2,9 +2,9 @@ import React, { FC } from 'react';
import Container from '@material-ui/core/Container'; import Container from '@material-ui/core/Container';
import { Route, useRouteMatch } from 'react-router-dom'; import { Route, useRouteMatch } from 'react-router-dom';
import { AuthRoutes } from 'api/routes'; import { AuthRoutes } from 'api/routes';
import { HomePage } from 'components/AuthUser/Dashboard/HomePage/HomePage'; import { HomePage } from './HomePage/HomePage';
import { ProfilePage } from 'components/AuthUser/Dashboard/ProfilePage/ProfilePage'; import { ProfilePage } from './ProfilePage/ProfilePage';
import { ReservationPage } from 'components/AuthUser/Dashboard/ReservationPage/ReservationPage'; import { ReservationPage } from './ReservationPage/ReservationPage';
export const Dashboard: FC = () => { export const Dashboard: FC = () => {
const { path } = useRouteMatch(); const { path } = useRouteMatch();
......
...@@ -10,12 +10,11 @@ import { ...@@ -10,12 +10,11 @@ import {
MuiThemeProvider, MuiThemeProvider,
Container, Container,
} from '@material-ui/core'; } from '@material-ui/core';
import { MapElement } from 'components/AuthUser/Dashboard/HomePage/MapElement'; import { MapElement } from 'components/Dashboard/HomePage/MapElement';
import { NavBarLogin } from 'components/AuthUser/Dashboard/HomePage/NavBarLogin'; import { NavBar } from 'components/Dashboard/HomePage/NavBar';
import { Numbers } from 'components/AuthUser/Dashboard/HomePage/Numbers'; import { Numbers } from 'components/Dashboard/HomePage/Numbers';
import { Steps } from 'components/AuthUser/Dashboard/HomePage/Steps'; import { Steps } from 'components/Dashboard/HomePage/Steps';
import { NavBar } from 'components/AuthUser/Dashboard/HomePage/NavBar'; import { Reservation } from '../ReservationPage/Reservation/Reservation';
import { Reservation } from 'components/AuthUser/Dashboard/ReservationPage/Reservation/Reservation';
let themeResp = createMuiTheme(); let themeResp = createMuiTheme();
themeResp = responsiveFontSizes(themeResp); themeResp = responsiveFontSizes(themeResp);
......
...@@ -3,8 +3,8 @@ import { makeStyles } from '@material-ui/core/styles'; ...@@ -3,8 +3,8 @@ import { makeStyles } from '@material-ui/core/styles';
import { Tabs, Tab } from '@material-ui/core'; import { Tabs, Tab } from '@material-ui/core';
import LockIcon from '@material-ui/icons/Lock'; import LockIcon from '@material-ui/icons/Lock';
import { Link, useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { NonAuthRoutes } from 'api/routes'; import { AuthRoutes } from 'api/routes';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
tabs: { tabs: {
...@@ -53,7 +53,7 @@ export const NavBarLogin: FC = () => { ...@@ -53,7 +53,7 @@ export const NavBarLogin: FC = () => {
TabIndicatorProps={{ style: { display: 'none' } }} TabIndicatorProps={{ style: { display: 'none' } }}
> >
<Tab <Tab
value={`/auth${NonAuthRoutes.signIn}`} value={`${AuthRoutes.dashboard}${AuthRoutes.home}`}
label="Login" label="Login"
icon={<LockIcon className={classes.tabIcon} />} icon={<LockIcon className={classes.tabIcon} />}
className={`${classes.tabPan} ${classes.rightAlign}`} className={`${classes.tabPan} ${classes.rightAlign}`}
......
import React, { FC } from 'react'; import React, { FC, useContext } from 'react';
import Button from '@material-ui/core/Button'; import Button from '@material-ui/core/Button';
import axios from 'axios'; import axios from 'axios';
import { NonAuthRoutes } from 'api/routes'; import { NonAuthRoutes } from 'api/routes';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { AuthContext } from 'components/Auth/AuthContext';
export const ProfilePage: FC = () => { export const ProfilePage: FC = () => {
const history = useHistory(); const history = useHistory();
const { setIsAuth } = useContext(AuthContext);
const logout = (): void => { const logout = (): void => {
axios axios.get('/api/web/login/logout').then(() => {
.get('/api/web/login/logout') setIsAuth(false);
.then(() => history.replace(NonAuthRoutes.home)); history.replace(NonAuthRoutes.home);
});
}; };
return ( return (
......
...@@ -19,8 +19,8 @@ import { ...@@ -19,8 +19,8 @@ import {
import AddIcon from '@material-ui/icons/Add'; import AddIcon from '@material-ui/icons/Add';
import Fab from '@material-ui/core/Fab'; import Fab from '@material-ui/core/Fab';
import { Reservation } from 'components/AuthUser/Dashboard/ReservationPage/Reservation/Reservation'; import { NavBar } from 'components/Dashboard/HomePage/NavBar';
import { NavBar } from '../HomePage/NavBar'; import { Reservation } from 'components/Dashboard/ReservationPage/Reservation/Reservation';
let themeResp = createMuiTheme(); let themeResp = createMuiTheme();
themeResp = responsiveFontSizes(themeResp); themeResp = responsiveFontSizes(themeResp);
......
...@@ -10,10 +10,10 @@ import { ...@@ -10,10 +10,10 @@ import {
MuiThemeProvider, MuiThemeProvider,
Container, Container,
} from '@material-ui/core'; } from '@material-ui/core';
import { MapElement } from 'components/AuthUser/Dashboard/HomePage/MapElement'; import { MapElement } from 'components/Dashboard/HomePage/MapElement';
import { NavBarLogin } from 'components/AuthUser/Dashboard/HomePage/NavBarLogin'; import { NavBarLogin } from 'components/Dashboard/HomePage/NavBarLogin';
import { Numbers } from 'components/AuthUser/Dashboard/HomePage/Numbers'; import { Numbers } from 'components/Dashboard/HomePage/Numbers';
import { Steps } from 'components/AuthUser/Dashboard/HomePage/Steps'; import { Steps } from 'components/Dashboard/HomePage/Steps';
let themeResp = createMuiTheme(); let themeResp = createMuiTheme();
themeResp = responsiveFontSizes(themeResp); themeResp = responsiveFontSizes(themeResp);
......
import React, { FC } from 'react';
export const TeamPage: FC = () => (
<>
<section>
<h2>These are the students of the MoveAid project</h2>
<div>
<h3>Alberto Defendi</h3>
<table>
<tr>
<td> </td>
<td>
<p>
Age: 19 <br />
Role: Front End Developer
<br />
Hobbys: Sports, maths
<br />
</p>
</td>
</tr>
</table>
</div>
<div>
<h3>Andrea Esposito</h3>
<table>
<tr>
<td> </td>
<td>
<p>
Age: 19 <br />
Role: xxxxx
<br />
Hobbys: xxxxxxxxx
<br />
</p>
</td>
</tr>
</table>
</div>
<div>
<h3>Marco Marinello</h3>
<table>
<tr>
<td> </td>
<td>
<p>
Age: 19 <br />
Role: xxxxx
<br />
Hobbys: xxxxxxxxx
<br />
</p>
</td>
</tr>
</table>
</div>
<div>
<h3>Francesco Mazzini</h3>
<table>
<tr>
<td> </td>
<td>
<p>
<strong>Age:</strong> 19 <br />
<br />
<strong>Role:</strong> Front End Developer
<br />
<br />
<strong>Hobbys:</strong> I like Graphic and Programing.
<br />
I also like playing videogames, hanging out <br />
with friends, watching tv series and <br />
training in gym!
</p>
</td>
</tr>
</table>
</div>
</section>
</>
);
src/components/NonAuthUser/LandingPage/assets/alberto.png

21.7 KiB

src/components/NonAuthUser/LandingPage/assets/logo04Circle.png

60.3 KiB

src/components/NonAuthUser/LandingPage/assets/pp.jpg

28.9 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment