fixes / register user
This commit is contained in:
@@ -39,7 +39,9 @@ const useStyles = makeStyles((theme) => ({
|
||||
export default function TopBar() {
|
||||
const classes = useStyles();
|
||||
const loggedIn = useSelector((state) => state.data.loggedIn);
|
||||
const username = useSelector((state) => state.data.userData.firstname);
|
||||
const firstname = useSelector((state) => state.data.userData.firstname);
|
||||
const login = useSelector((state) => state.data.userData.login);
|
||||
const isRestaurant = useSelector((state) => state.data.userData.isRestaurant)
|
||||
const history = useHistory();
|
||||
const dispatch = useDispatch();
|
||||
const handleClick = (button) => {
|
||||
@@ -95,13 +97,13 @@ export default function TopBar() {
|
||||
onClick={() => history.push("/")}
|
||||
/>
|
||||
<div className="vertical-divider"></div>
|
||||
<h5>Food guide (wersja testowa)</h5>
|
||||
<h5>Food guide</h5>
|
||||
</div>
|
||||
<div className="topBar-hamburger">
|
||||
{loggedIn && (
|
||||
<div className="topbar-username">
|
||||
{" "}
|
||||
<p>Witaj {username}</p>{" "}
|
||||
<p>Witaj {isRestaurant ? firstname : login}</p>{" "}
|
||||
</div>
|
||||
)}
|
||||
<IconButton onClick={toggleDrawer(true)} aria-label="menu">
|
||||
|
||||
Reference in New Issue
Block a user