Satisfy linter in event template
This commit is contained in:
1 parent
9fc324ded9
commit
cb53037a8b
2 files changed
+24
-11
No files matched your search
+7
-3
@@ -5,13 +5,17 @@
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
|
||||
"react/prefer-stateless-function": "off",
|
||||
"react/require-default-props": "off",
|
||||
"react/prop-types": "off",
|
||||
"react/no-danger": "off"
|
||||
"react/no-danger": "off",
|
||||
"react/jsx-one-expression-per-line": "off"
|
||||
},
|
||||
"settings": {
|
||||
"import/core-modules": []
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"jest": true,
|
||||
"node": true
|
||||
}
|
||||
}
|
||||
+17
-8
@@ -2,22 +2,23 @@ import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Helmet from 'react-helmet'
|
||||
import { graphql, Link } from 'gatsby'
|
||||
import Layout from '../components/Layout'
|
||||
import Img from 'gatsby-image'
|
||||
|
||||
import moment from 'moment'
|
||||
import 'moment/locale/nb'
|
||||
|
||||
import Layout from '../components/Layout'
|
||||
|
||||
moment.locale('nb')
|
||||
|
||||
const formatPrices = (regular, student) => {
|
||||
let cc = ''
|
||||
if (regular && regular != 0) {
|
||||
if (regular && regular !== 0) {
|
||||
cc += regular
|
||||
}
|
||||
if (student && student != 0) {
|
||||
cc += ' / ' + student
|
||||
if (student && student !== 0) {
|
||||
cc += ` / ${student}`
|
||||
}
|
||||
return cc == '' ? 'Gratis' : cc
|
||||
return cc === '' ? 'Gratis' : cc
|
||||
}
|
||||
|
||||
export const EventTemplate = ({
|
||||
@@ -106,8 +107,16 @@ export const EventTemplate = ({
|
||||
|
||||
EventTemplate.propTypes = {
|
||||
content: PropTypes.node.isRequired,
|
||||
title: PropTypes.string,
|
||||
featuredImage: PropTypes.object,
|
||||
title: PropTypes.string.isRequired,
|
||||
featuredMedia: PropTypes.shape({}),
|
||||
startTime: PropTypes.string.isRequired,
|
||||
endTime: PropTypes.string,
|
||||
venue: PropTypes.string,
|
||||
facebookUrl: PropTypes.string,
|
||||
ticketUrl: PropTypes.string,
|
||||
priceStudent: PropTypes.string,
|
||||
priceRegular: PropTypes.string,
|
||||
eventTypes: PropTypes.arrayOf(PropTypes.string),
|
||||
}
|
||||
|
||||
const Event = ({ data }) => {
|
||||
|
||||
Reference in new issue
Block a user