Skip to content

Commit

Permalink
Speed fixes (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
maccyber committed Jun 16, 2018
1 parent cc901d4 commit 50780ce
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component, Fragment } from 'react'
import getConfig from 'next/config'
import ReactMapGL, { Marker, Popup } from 'react-map-gl'
import { FaCircle } from 'react-icons/lib/fa'
import 'mapbox-gl/dist/mapbox-gl.css'
import getData from '../lib/get-data'

const { publicRuntimeConfig: { TOKEN, URL_STATIONS } } = getConfig()
Expand Down
4 changes: 1 addition & 3 deletions components/alheimsins/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export default ({ title, theme = {}, children }) => (
<meta name='twitter:image' content='https://bigfive-test.com/static/apple-icon.png' />
<meta name='description' content='Se forurensning og luftkvalitet nær deg.' />
<meta name='keywords' content='forurensning luftkvalitet luft astma' />
<link rel='stylesheet' href='/static/mapbox-gl.css' />
<link rel='stylesheet' href='/static/font-awesome-animation.min.css' />
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' />
<link rel='stylesheet' href='/static/font-awesome-animation.min.css' media='none' />
<script type='application/ld+json' dangerouslySetInnerHTML={{ __html: `{ "@context": "http://schema.org/", "@type": "WebSite", "name": "Luftstatus", "url": "https://luftstatus.no" }` }} />
<link rel='icon' sizes='192x192' href='/static/android-icon-192x192.png' />
<link rel='apple-touch-icon' href='/static/apple-icon-152x152.png' />
Expand Down
14 changes: 0 additions & 14 deletions lib/get-data-areas.js

This file was deleted.

4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const withOffline = require('next-offline')
const withCSS = require('@zeit/next-css')

module.exports = {
useFileSystemPublicRoutes: false,
Expand All @@ -8,5 +9,6 @@ module.exports = {
URL_AREAS: process.env.URL_AREAS || 'https://s3.eu-central-1.amazonaws.com/luftstatus/areas.json',
TOKEN: process.env.TOKEN || '<INSERT-YOUR-MAPBOX-TOKEN>'
},
...withOffline()
...withOffline(),
...withCSS()
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"keywords": [],
"license": "MIT",
"dependencies": {
"@zeit/next-css": "^0.2.0",
"axios": "0.18.0",
"express": "4.16.3",
"next": "6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { geolocated } from 'react-geolocated'
import { FaCircle } from 'react-icons/lib/fa'
import { Layout, Loading, Link } from '../components/alheimsins'
import getConfig from 'next/config'
import getData from '../lib/get-data-areas'
import getData from '../lib/get-data'
const { publicRuntimeConfig: { URL_AREAS } } = getConfig()

const ColorDescription = () => (
Expand Down
2 changes: 2 additions & 0 deletions production.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
URL=https://s3.eu-central-1.amazonaws.com/luftstatus/data.json
URL_STATIONS=https://s3.eu-central-1.amazonaws.com/luftstatus/stations.json
URL_AREAS=https://s3.eu-central-1.amazonaws.com/luftstatus/areas.json
TOKEN=@mapbox_token

0 comments on commit 50780ce

Please sign in to comment.