Skip to content

Commit

Permalink
Feilmelding om man prøver ha en usynlig kandidat i kontekst
Browse files Browse the repository at this point in the history
  • Loading branch information
frodank committed Aug 2, 2023
1 parent 630019a commit be876e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/stillingssok/kontekst-av-kandidat/KontekstAvKandidat.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import useKandidat from './useKandidat';
import Kandidatbanner from 'felles/komponenter/kandidatbanner/Kandidatbanner';
import { Alert } from '@navikt/ds-react';

type Props = {
fnr: string;
};

const KontekstAvKandidat = ({ fnr }: Props) => {
const { kandidat } = useKandidat(fnr);
const { kandidat, feilmelding } = useKandidat(fnr);

return (
console.log('KontekstAvKandidat', kandidat);
return feilmelding ? (
<Alert variant="error">{feilmelding}</Alert>
) : (
<Kandidatbanner
kandidat={kandidat}
brødsmulesti={
Expand Down

0 comments on commit be876e6

Please sign in to comment.