Passed
Branch master (89d7d4)
by Daniel
01:32
created

JobModalContent.tsx ➔ JobModalContent   A

Complexity

Conditions 1

Size

Total Lines 25
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 25
rs 9.4
c 0
b 0
f 0
cc 1
1
import React from 'react';
2
import parse from 'html-react-parser';
3
import { Fareknapp } from 'nav-frontend-knapper';
4
5
import { formatDate } from '../../assets/utils/functions';
6
7
import style from './JobModalContent.module.scss';
8
9
import { TJobContentProps } from './JobModalContent.type';
10
11
function JobModalContent({
12
  name,
13
  description,
14
  extent,
15
  applicationDue,
16
  closeModal,
17
}: TJobContentProps): JSX.Element {
18
  return (
19
    <>
20
      <Fareknapp onClick={closeModal}>Lukk</Fareknapp>
21
      <div className={style.jobDiv}>
22
        <span className={style.jobContent}>
23
          <span className={style.jobTitle}>
24
            {name}
25
            <br />
26
            {extent}
27
            <br />
28
            {formatDate(applicationDue)}
29
          </span>
30
          <br />
31
          {parse(description)}
32
        </span>
33
      </div>
34
    </>
35
  );
36
}
37
export default JobModalContent;
38