Skip to content

Commit

Permalink
Bruk isAudienceSykmeldt i stedet for audience
Browse files Browse the repository at this point in the history
  • Loading branch information
haakomol committed Sep 24, 2024
1 parent b63ed00 commit a60aaa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/common/components/motebehov/MotebehovKvittering.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ interface Props {
}

const MotebehovKvittering = ({ motebehov }: Props) => {
const { audience } = useAudience();
const { isAudienceSykmeldt } = useAudience();

const behandlerVaereMedTekst =
audience === "Arbeidsgiver"
? MeldBehovTextsAG.checkboxLabelOnskerBehandlerMed
: MeldBehovTextsSM.checkboxLabelOnskerBehandlerMed;
const behandlerVaereMedTekst = isAudienceSykmeldt
? MeldBehovTextsSM.checkboxLabelOnskerBehandlerMed
: MeldBehovTextsAG.checkboxLabelOnskerBehandlerMed;

const onskerAtBehandlerBlirMed = motebehov.svar?.forklaring?.includes(
behandlerVaereMedTekst
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/motebehov/SvarBehovForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface Props {
function SvarBehovForm({ isSubmitting, onSubmitForm }: Props) {
const { trackEvent } = useAmplitude();

const { audience } = useAudience();
const { isAudienceSykmeldt } = useAudience();

const {
control,
Expand Down Expand Up @@ -104,7 +104,7 @@ function SvarBehovForm({ isSubmitting, onSubmitForm }: Props) {
{...field}
id={motebehovRadioGroup}
legend={
audience === "Sykmeldt"
isAudienceSykmeldt
? texts.formLabels.legendRadioHarBehovSykmeldt
: texts.formLabels.legendRadioHarBehovArbeidsgiver
}
Expand Down

0 comments on commit a60aaa9

Please sign in to comment.