mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Since `next.cliOutput` won't have access to runtime logs we can refactor this test to render text on the page instead.
18 lines
356 B
TypeScript
18 lines
356 B
TypeScript
import React from 'react'
|
|
|
|
export async function getStaticProps({ params, revalidateReason }) {
|
|
console.log(
|
|
'revalidate-reason/pages/index.tsx revalidateReason:',
|
|
revalidateReason
|
|
)
|
|
return {
|
|
props: {
|
|
reason: revalidateReason,
|
|
},
|
|
}
|
|
}
|
|
|
|
export default ({ reason }) => {
|
|
return <p id="reason">revalidate reason: {reason}</p>
|
|
}
|