File size: 437 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Link from 'next/link'
import getConfig from 'next/config'
const { publicRuntimeConfig, serverRuntimeConfig } = getConfig()

const About = ({ bar }) => (
  <div id="about-page">
    <div>
      <Link href="/">Go Back</Link>
    </div>
    <p>{`This is the About page ${publicRuntimeConfig.foo}${bar || ''}`}</p>
  </div>
)

About.getInitialProps = async (ctx) => {
  return { bar: serverRuntimeConfig.bar }
}

export default About