Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 41 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import React from "react"; |
||
2 | import parse from "html-react-parser"; |
||
3 | |||
4 | import { Button } from "@navikt/ds-react"; |
||
5 | |||
6 | import { formatDate } from "../../assets/utils/functions"; |
||
7 | |||
8 | import style from "./JobModalContent.module.scss"; |
||
9 | |||
10 | import { TJobContentProps } from "./JobModalContent.type"; |
||
11 | |||
12 | function JobModalContent({ |
||
13 | name, |
||
14 | description, |
||
15 | extent, |
||
16 | applicationDue, |
||
17 | closeModal, |
||
18 | }: TJobContentProps): JSX.Element { |
||
19 | return ( |
||
20 | <> |
||
21 | <Button variant="danger" onClick={closeModal}> |
||
22 | Lukk |
||
23 | </Button> |
||
24 | <div className={style.jobDiv}> |
||
25 | <span className={style.jobContent}> |
||
26 | <span className={style.jobTitle}> |
||
27 | {name} |
||
28 | <br /> |
||
29 | {extent} |
||
30 | <br /> |
||
31 | {formatDate(applicationDue)} |
||
32 | </span> |
||
33 | <br /> |
||
34 | {parse(description)} |
||
35 | </span> |
||
36 | </div> |
||
37 | </> |
||
38 | ); |
||
39 | } |
||
40 | export default JobModalContent; |
||
41 |