Skip to content
Snippets Groups Projects
Verified Commit 9e46aeee authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Merge @fmazzini Navbar.

parent e7a755a1
No related branches found
No related tags found
2 merge requests!56Refined auth flow and new website pages.,!47Merge @fmazzini components.
...@@ -3,6 +3,9 @@ import { makeStyles } from '@material-ui/core/styles'; ...@@ -3,6 +3,9 @@ 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 { NonAuthRoutes } from 'api/routes';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
tabs: { tabs: {
color: 'white', color: 'white',
...@@ -26,15 +29,19 @@ const useStyles = makeStyles(() => ({ ...@@ -26,15 +29,19 @@ const useStyles = makeStyles(() => ({
})); }));
export const NavBarLogin: FC = () => { export const NavBarLogin: FC = () => {
const history = useHistory();
const classes = useStyles(); const classes = useStyles();
const [value, setValue] = React.useState(0); const [value, setValue] = React.useState('');
const handleChange = ( const handleChange = (
event: React.ChangeEvent<unknown>, event: React.ChangeEvent<unknown>,
newValue: number, newValue: string,
): void => { ): void => {
setValue(newValue); setValue(newValue);
history.replace(newValue);
console.log(newValue);
}; };
return ( return (
...@@ -45,8 +52,8 @@ export const NavBarLogin: FC = () => { ...@@ -45,8 +52,8 @@ export const NavBarLogin: FC = () => {
className={classes.tabs} className={classes.tabs}
TabIndicatorProps={{ style: { display: 'none' } }} TabIndicatorProps={{ style: { display: 'none' } }}
> >
<Tab label="" className={classes.tabPan} />
<Tab <Tab
value={`/auth${NonAuthRoutes.signIn}`}
label="Login" label="Login"
icon={<LockIcon className={classes.tabIcon} />} icon={<LockIcon className={classes.tabIcon} />}
className={`${classes.tabPan} ${classes.rightAlign}`} className={`${classes.tabPan} ${classes.rightAlign}`}
......
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