From a475a593d43201d28a61228944a0ad3160a0f2f3 Mon Sep 17 00:00:00 2001 From: charliemidtlyng Date: Thu, 9 Jan 2025 15:52:55 +0100 Subject: [PATCH] Oppdatert header slik at lenker blir klikkbare --- package.json | 2 +- .../HeaderMedS\303\270k.tsx" | 12 +++-------- yarn.lock | 21 ++++++++++++------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index a37a3db61..e925e7e99 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@navikt/familie-backend": "10.1.2", "@navikt/familie-endringslogg": "^14.0.0", "@navikt/familie-form-elements": "^21.0.2", - "@navikt/familie-header": "^14.2.0", + "@navikt/familie-header": "^15.0.0", "@navikt/familie-logging": "^7.0.2", "@navikt/familie-visittkort": "^15.1.2", "@navikt/fnrvalidator": "^2.1.5", diff --git "a/src/frontend/Felles/HeaderMedS\303\270k/HeaderMedS\303\270k.tsx" "b/src/frontend/Felles/HeaderMedS\303\270k/HeaderMedS\303\270k.tsx" index 6d78a8d56..97da2cbbf 100644 --- "a/src/frontend/Felles/HeaderMedS\303\270k/HeaderMedS\303\270k.tsx" +++ "b/src/frontend/Felles/HeaderMedS\303\270k/HeaderMedS\303\270k.tsx" @@ -30,9 +30,7 @@ const lagAInntekt = ( return { name: 'A-inntekt', - href: '#/a-inntekt', - onClick: async (e: React.SyntheticEvent) => { - e.preventDefault(); + onSelect: async () => { window.open(await lagAInntektLink(axiosRequest, appEnv, fagsakId, fagsakPersonId)); }, }; @@ -45,9 +43,7 @@ const lagGosys = (appEnv: AppEnv, personIdent: string | undefined): PopoverItem return { name: 'Gosys', - href: '#/gosys', - onClick: async (e: React.SyntheticEvent) => { - e.preventDefault(); + onSelect: async () => { window.open(lagGosysLink(appEnv, personIdent)); }, }; @@ -60,9 +56,7 @@ const lagModia = (appEnv: AppEnv, personIdent: string | undefined): PopoverItem return { name: 'Modia', - href: '#/modia', - onClick: async (e: React.SyntheticEvent) => { - e.preventDefault(); + onSelect: async () => { window.open(lagModiaLink(appEnv, personIdent)); }, }; diff --git a/yarn.lock b/yarn.lock index a00d3faa8..a07501b80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1591,14 +1591,14 @@ classnames "^2.5.1" react-select "^5.8.0" -"@navikt/familie-header@^14.2.0": - version "14.2.0" - resolved "https://npm.pkg.github.com/download/@navikt/familie-header/14.2.0/7f4707fd89404d9c0e076985b1412df96d030638#7f4707fd89404d9c0e076985b1412df96d030638" - integrity sha512-31xouAE3sHZCAQ29YYXIT1AfjVSLH/tNBHier9RrhjM623jNChMu2WlczNScpNKSx8UbgAreW7tumtVIk8K9wA== +"@navikt/familie-header@^15.0.0": + version "15.0.0" + resolved "https://npm.pkg.github.com/download/@navikt/familie-header/15.0.0/fc59270c3027ac3996c38720031d52b9dc41d98e#fc59270c3027ac3996c38720031d52b9dc41d98e" + integrity sha512-pwTbuecJEQv5WvfDOwgyuaIWRsvuB/eNmS1YCmdtzxvLBKXD8+gtxFApZHsDYP8rD5BeyZA4vhooYokQRtPsmQ== dependencies: - "@navikt/familie-ikoner" "^9.0.2" + "@navikt/familie-ikoner" "^9.0.3" "@navikt/familie-typer" "^8.0.2" - "@navikt/fnrvalidator" "^2.1.0" + "@navikt/fnrvalidator" "^2.1.5" "@navikt/familie-ikoner@^9.0.2": version "9.0.2" @@ -1607,6 +1607,13 @@ dependencies: "@navikt/familie-typer" "^8.0.2" +"@navikt/familie-ikoner@^9.0.3": + version "9.0.3" + resolved "https://npm.pkg.github.com/download/@navikt/familie-ikoner/9.0.3/a39776fe08f2acb1b6d6474dada0b5fd1770bfa1#a39776fe08f2acb1b6d6474dada0b5fd1770bfa1" + integrity sha512-WG0H9jFKMWcgwrRXlInZTr66jYAg2Ia81dXCU5YkudOgX8bJwl0ttQHHwp+AuCmdmguAl5xSYVJcb77rN3J8dg== + dependencies: + "@navikt/familie-typer" "^8.0.2" + "@navikt/familie-logging@^7.0.2", "@navikt/familie-logging@^7.0.3": version "7.0.3" resolved "https://npm.pkg.github.com/download/@navikt/familie-logging/7.0.3/64e03ec40585d30ab00c193d373f69dfa855def8#64e03ec40585d30ab00c193d373f69dfa855def8" @@ -1628,7 +1635,7 @@ "@navikt/familie-typer" "^8.0.2" classnames "^2.5.1" -"@navikt/fnrvalidator@^2.1.0", "@navikt/fnrvalidator@^2.1.5": +"@navikt/fnrvalidator@^2.1.5": version "2.1.5" resolved "https://npm.pkg.github.com/download/@navikt/fnrvalidator/2.1.5/e33cbc5693b14419bbcf4d5daee2ac9eeec532e5#e33cbc5693b14419bbcf4d5daee2ac9eeec532e5" integrity sha512-uHzoL3ZTYwrF7OTKaihNf9xHH6S9WnGqz420HX4lEX+yu5367l+dYxI5OIRVT5MKWEDQ4DCVSAuJhoWValv6Fw==