Passed
Pull Request — develop (#758)
by Kevin Van
08:39 queued 04:54
created

src/pages/club/downloads.tsx   A

Complexity

Total Complexity 4
Complexity/F 0

Size

Lines of Code 53
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 41
mnd 4
bc 4
fnc 0
dl 0
loc 53
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import React from "react"
2
import { Seo } from "../../components/Seo"
3
import Layout from "../../layouts"
4
5
import downloadOngevalAangifte from "../../downloads/insurance_medical_attest_template_nl.pdf"
6
import { CardHorizontal } from "../../components/Card"
7
import { getImage } from "gatsby-plugin-image"
8
import { graphql } from "gatsby"
9
import { DownloadsPageProps } from "../../Types/PageProps"
10
11
import "./downloads.scss"
12
13
const DownloadsPage = ({ data: { medicalattest } }: DownloadsPageProps) => {
14
  const pictureOngevalAangifte =
15
    medicalattest?.childImageSharp?.gatsbyImageData && getImage(medicalattest?.childImageSharp?.gatsbyImageData)
16
  return (
17
    <Layout>
18
      <header className="page_header__wrapper">
19
        <div className="page_header">
20
          <h1>Digitale documenten - downloads</h1>
21
        </div>
22
      </header>
23
      <div className="page__wrapper page__wrapper--limited page__section page__downloads">
24
        <h2 className="featured-border">Aangiftes</h2>
25
        <section>
26
          {pictureOngevalAangifte && (
27
            <CardHorizontal
28
              title="Ongevalsaangifte"
29
              link={downloadOngevalAangifte}
30
              picture={pictureOngevalAangifte}
31
              body="<span class='label label--download'>DOWNLOAD</span><br/> Vanaf 1 september worden enkel nog digitale ongevalsaangiftes aanvaard. Gelieve bijgevoegd document ingevuld — digitaal – aan de GC te bezorgen."
32
            />
33
          )}
34
        </section>
35
      </div>
36
    </Layout>
37
  )
38
}
39
40
export const Head = () => {
41
  return <Seo title="Downloads" description="Download digitale documenten" path="/downloads/" />
42
}
43
44
export const pageQuery = graphql`
45
  query DownloadsPage {
46
    medicalattest: file(name: { eq: "insurance_medical_attest_template_nl" }) {
47
      ...KCVVFullWidth
48
    }
49
  }
50
`
51
52
export default DownloadsPage
53