44d74e399f
* Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `custom-server` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `custom-server-actionhero` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> Co-authored-by: Marcus Silva <mvfsillva@gmail.com>
27 lines
467 B
JavaScript
27 lines
467 B
JavaScript
import Link from 'next/link'
|
|
import faker from 'faker'
|
|
|
|
const Index = ({ name }) => {
|
|
return (
|
|
<div>
|
|
<h1>Home Page</h1>
|
|
<p>Welcome, {name}</p>
|
|
<div>
|
|
<Link href="/about">
|
|
<a>About Page</a>
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Index
|
|
|
|
export async function getStaticProps() {
|
|
// The name will be generated at build time only
|
|
const name = faker.name.findName()
|
|
|
|
return {
|
|
props: { name },
|
|
}
|
|
}
|