Skip to content

Commit

Permalink
add check for newCvLink
Browse files Browse the repository at this point in the history
  • Loading branch information
jjtg-nav committed Feb 15, 2021
1 parent a0ca435 commit c313454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Header = ({
{authenticationStatus === AuthStatus.IS_AUTHENTICATED ? (
<div className="Header__Innstillinger__wrapper">
{arbeidsgiverSelect && arbeidsgiverSelect}
{showNewCvLink && <NewCvLink />}
{!underOppfolging && showNewCvLink && <NewCvLink />}
{underOppfolging &&
<Lenkeknapp
onClick={onNavigationClick("https://www.nav.no/person/dittnav")}
Expand Down Expand Up @@ -266,6 +266,7 @@ const Header = ({
applikasjon={applikasjon}
validerNavigasjon={validerNavigasjon}
onNavigationClick={onNavigationClick}
underOppfolging={underOppfolging}
/>
</div>
)}
Expand Down Expand Up @@ -319,6 +320,7 @@ const Header = ({
applikasjon={applikasjon}
validerNavigasjon={validerNavigasjon}
onNavigationClick={onNavigationClick}
underOppfolging={underOppfolging}
/>
</div>
)}
Expand Down
5 changes: 3 additions & 2 deletions src/header/personbruker/Personbrukermeny.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import './Personbrukermeny.less';
import {NavLink} from 'react-router-dom';
import Cookies from "universal-cookie";
import {NY_CV_URL} from "../../fasitProperties";
import {useSelector} from "react-redux";

const tabs = [
{
Expand Down Expand Up @@ -83,7 +84,7 @@ export const NyCVLenkeMobil = ({onNavigationClick}) => (
);


export const Personbrukermeny = ({ applikasjon, onNavigationClick }) => {
export const Personbrukermeny = ({ applikasjon, onNavigationClick, underOppfolging }) => {
const cookies = new Cookies();
const useNewCv = cookies.get('useNewCv') === 'true';
const showNewCvLink = !useNewCv && cookies.get('newCvRolloutGroup') === 'true';
Expand Down Expand Up @@ -138,7 +139,7 @@ export const Personbrukermeny = ({ applikasjon, onNavigationClick }) => {
</div>
)
))}
{showNewCvLink && <NyCVLenkeMobil onNavigationClick={onNavigationClick}/>}
{underOppfolging && showNewCvLink && <NyCVLenkeMobil onNavigationClick={onNavigationClick} />}
<InnstillingerLenkeMobil applikasjon={applikasjon} onNavigationClick={onNavigationClick}/>
</nav>
);
Expand Down

0 comments on commit c313454

Please sign in to comment.