Skip to content
Snippets Groups Projects

Merge @fmazzini components.

Merged Defendi Alberto requested to merge feature/privateroute/role into dev
2 files
+ 122
52
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -3,6 +3,9 @@ import { makeStyles } from '@material-ui/core/styles';
import { Tabs, Tab } from '@material-ui/core';
import LockIcon from '@material-ui/icons/Lock';
import { Link, useHistory } from 'react-router-dom';
import { NonAuthRoutes } from 'api/routes';
const useStyles = makeStyles(() => ({
tabs: {
color: 'white',
@@ -26,15 +29,19 @@ const useStyles = makeStyles(() => ({
}));
export const NavBarLogin: FC = () => {
const history = useHistory();
const classes = useStyles();
const [value, setValue] = React.useState(0);
const [value, setValue] = React.useState('');
const handleChange = (
event: React.ChangeEvent<unknown>,
newValue: number,
newValue: string,
): void => {
setValue(newValue);
history.replace(newValue);
console.log(newValue);
};
return (
@@ -45,8 +52,8 @@ export const NavBarLogin: FC = () => {
className={classes.tabs}
TabIndicatorProps={{ style: { display: 'none' } }}
>
<Tab label="" className={classes.tabPan} />
<Tab
value={`/auth${NonAuthRoutes.signIn}`}
label="Login"
icon={<LockIcon className={classes.tabIcon} />}
className={`${classes.tabPan} ${classes.rightAlign}`}
Loading