rsnext/test/integration/export/pages/about.js

21 lines
458 B
JavaScript
Raw Normal View History

2017-05-09 23:03:20 +02:00
import Link from 'next/link'
import getConfig from 'next/config'
const { publicRuntimeConfig, serverRuntimeConfig } = getConfig()
2017-05-09 23:03:20 +02:00
const About = ({ bar }) => (
2017-05-09 23:03:20 +02:00
<div id='about-page'>
<div>
<Link href='/'>
<a>Go Back</a>
</Link>
</div>
<p>{`This is the About page ${publicRuntimeConfig.foo}${bar || ''}`}</p>
2017-05-09 23:03:20 +02:00
</div>
)
About.getInitialProps = async ctx => {
return { bar: serverRuntimeConfig.bar }
}
export default About