Skip to content

Commit

Permalink
endre uxsignals infoboks
Browse files Browse the repository at this point in the history
  • Loading branch information
anderslysne committed Nov 6, 2024
1 parent c99120f commit 24f5127
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/Pages/Hovedside/InfoBokser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,14 @@ type InfoboksProps = {
const infobokser: Array<InfoboksProps> = [
{
id: 'uxsignals',
visFra: new Date('2024-10-04T00:00:00+02:00'),
visTil: new Date('2024-11-04T10:00:00+02:00'),
visFra: new Date('2024-11-06T00:00:00+02:00'),
visTil: new Date('2024-12-31T10:00:00+02:00'),
Component: () => {
const { organisasjoner } = useContext(OrganisasjonerOgTilgangerContext);
const harForebyggeFravarTilgang = Record.values(organisasjoner).some(
(org) => org.altinntilgang.forebyggefravar
);

if (harForebyggeFravarTilgang) {
return <UXSignals dataUxsignalsEmbed="panel-7t3dixiw4u" />;
} else {
const { valgtOrganisasjon } = useContext(OrganisasjonsDetaljerContext);
if (!valgtOrganisasjon || !valgtOrganisasjon.altinntilgang.inntektsmelding) {
return null;
}
return <UXSignals dataUxsignalsEmbed="panel-mwwvs1lq0" />;
},
},
{
Expand Down

0 comments on commit 24f5127

Please sign in to comment.