src/components/JobModalContent/JobModalContent.tsx   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 33
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 30
mnd 1
bc 1
fnc 0
dl 0
loc 33
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import parse from "html-react-parser"
2
import { Button } from "@navikt/ds-react"
3
4
import { formatDate } from "@/assets/utils/functions"
5
6
import style from "./JobModalContent.module.scss"
7
8
import { TJobContentProps } from "./JobModalContent.type"
9
10
const JobModalContent = ({ name, description, extent, applicationDue, closeModal }: TJobContentProps) => {
11
  return (
12
    <>
13
      <Button className={style["lukke-knapp"]} variant="danger" onClick={closeModal}>
14
        Lukk
15
      </Button>
16
      <div className={style["job-div"]}>
17
        <span className={style["job-content"]}>
18
          <span className={style["job-title"]}>
19
            {name}
20
            <br />
21
            {extent}
22
            <br />
23
            {`Søknadsfrist: ${applicationDue ? formatDate(applicationDue) : ""}`}
24
          </span>
25
          <br />
26
          {parse(description)}
27
        </span>
28
      </div>
29
    </>
30
  )
31
}
32
export default JobModalContent
33