Skip to content
Snippets Groups Projects
Commit 5f9d3a0f authored by Andreas Magnvall's avatar Andreas Magnvall
Browse files

Merged PR 8879: Add user identification

parent c82102c5
Branches
Tags
1 merge request!2Merged PR 8469: Project structure updated
...@@ -6,9 +6,11 @@ import classes from '../styles/header.module.sass' ...@@ -6,9 +6,11 @@ import classes from '../styles/header.module.sass'
import { menuData } from '../data/MenuData' import { menuData } from '../data/MenuData'
import { FaBars } from 'react-icons/fa' import { FaBars } from 'react-icons/fa'
import { Link } from "gatsby" import { Link } from "gatsby"
import { useMsal } from '../utility/auth/msalContext';
const Header = () => { const Header = () => {
const { user } = useMsal();
const openInNewTab = (url) => { const openInNewTab = (url) => {
const newWindow = window.open(url, '_blank', 'noopener,noreferrer') const newWindow = window.open(url, '_blank', 'noopener,noreferrer')
...@@ -52,7 +54,14 @@ const Header = () => { ...@@ -52,7 +54,14 @@ const Header = () => {
))} ))}
</div> </div>
<div className={classes.login}> <div className={classes.login}>
{ user ? <div className={classes.identification}>
{user.name}
<br></br>
{user.username}
</div> : <></>
}
<Login></Login> <Login></Login>
</div> </div>
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
position: relative; position: relative;
width: 100%; width: 100%;
border-bottom: 1px solid var(--color-subtle-medium); border-bottom: 1px solid var(--color-subtle-medium);
justify-content: flex-end;
.logocontainer
flex: 1
.logo .logo
color: black; color: black;
...@@ -21,11 +23,14 @@ ...@@ -21,11 +23,14 @@
line-height: 18px; line-height: 18px;
padding-left: 1.8rem; padding-left: 1.8rem;
cursor: pointer; cursor: pointer;
flex-grow: 1;
@media (max-width: 768px) @media (max-width: 768px)
padding-left: 0; padding-left: 0;
padding-left: 1.8rem; padding-left: 1.8rem;
text-align: left; text-align: left;
.navlink .navlink
font-weight: 400; font-weight: 400;
...@@ -42,8 +47,11 @@ ...@@ -42,8 +47,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 24px; margin-right: 24px;
flex: 1
justify-content: flex-end
@media (max-width: 768px) @media (max-width: 768px)
display: none; display: none;
.navmenu .navmenu
display: flex; display: flex;
...@@ -56,4 +64,7 @@ ...@@ -56,4 +64,7 @@
.burger .burger
@media (min-width: 768px) @media (min-width: 768px)
display: none; display: none;
\ No newline at end of file
.identification
margin-right: 50px
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment