diff --git a/gatsby-config.js b/gatsby-config.js index d058e69..0710001 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -7,6 +7,12 @@ module.exports = { plugins: [ 'gatsby-plugin-react-helmet', 'gatsby-plugin-sass', + { + resolve: 'gatsby-source-filesystem', + options: { + path: `${__dirname}/gatsby-config.js`, + }, + }, { resolve: 'gatsby-source-wordpress', options: { diff --git a/src/components/EventList.js b/src/components/EventList.js index 1030b25..ef0b2e9 100644 --- a/src/components/EventList.js +++ b/src/components/EventList.js @@ -25,38 +25,48 @@ const eventOrganizersQuery = graphql` ` const EventList = props => { const renderEvent = event => { + const featuredMedia = event.featured_media + const hasFeaturedMedia = featuredMedia && !!featuredMedia.localFile /* TODO: Make API return proper UTC datetimes */ - const startTimeNaive = event.start_time.replace("+00:00", "") - const utcOffset = 2; + const startTimeNaive = event.start_time.replace('+00:00', '') + const utcOffset = 2 const start = moment.utc(startTimeNaive).utcOffset(utcOffset) return ( -