2017-12-02 18:08:53 +01:00
|
|
|
import React from 'react'
|
2018-09-05 14:38:39 +02:00
|
|
|
import getConfig from 'next/config'
|
2017-12-02 18:08:53 +01:00
|
|
|
|
2018-12-17 17:34:32 +01:00
|
|
|
const { publicRuntimeConfig } = getConfig()
|
|
|
|
const { API_URL } = publicRuntimeConfig
|
2017-12-02 18:08:53 +01:00
|
|
|
|
|
|
|
export default class extends React.Component {
|
|
|
|
static async getInitialProps () {
|
2018-03-27 20:11:03 +02:00
|
|
|
// fetch(`${API_URL}/some-path`)
|
2017-12-02 18:08:53 +01:00
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2018-12-17 17:34:32 +01:00
|
|
|
return <div>The API_URL is {API_URL}</div>
|
2017-12-02 18:08:53 +01:00
|
|
|
}
|
|
|
|
}
|