| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 25 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import React, { Component } from "react" |
||
| 2 | |||
| 3 | import moment from "moment-timezone" |
||
| 4 | import "moment/locale/nl-be" |
||
| 5 | |||
| 6 | import { CardImage } from "../components/cards" |
||
| 7 | |||
| 8 | class Event extends Component { |
||
| 9 | render() { |
||
| 10 | const { title, localFile, uri, datetime_start, datetime_end } = this.props |
||
| 11 | |||
| 12 | moment.locale("nl-BE") |
||
| 13 | const momentStart = moment(datetime_start).tz("Europe/Brussels") |
||
| 14 | const momentEnd = moment(datetime_end).tz("Europe/Brussels") |
||
| 15 | const body = `Van ${momentStart.format( |
||
| 16 | "dddd DD MMMM YYYY - H:mm" |
||
| 17 | )} tot ${momentEnd.format("dddd DD MMMM - H:mm")}` |
||
| 18 | return ( |
||
| 19 | <CardImage title={title} localFile={localFile} link={uri} body={body} /> |
||
| 20 | ) |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 24 | export default Event |
||
| 25 |