1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test/integration/export/pages/about.js
2019-02-11 19:28:47 -06:00

21 lines
460 B
JavaScript

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