mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
18 lines
307 B
JavaScript
18 lines
307 B
JavaScript
import React from 'react'
|
|
import env from '../lib/env'
|
|
|
|
const {API_URL} = env
|
|
|
|
export default class extends React.Component {
|
|
static async getInitialProps () {
|
|
// fetch(`${API_URL}/some-path`)
|
|
return {}
|
|
}
|
|
|
|
render () {
|
|
return <div>
|
|
The API_URL is {API_URL}
|
|
</div>
|
|
}
|
|
}
|