mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This is follow-up to https://github.com/vercel/next.js/pull/74607 ensuring we also don't lose the revalidate value configured when `notFound()` or similar is used. x-ref: [slack thread](https://vercel.slack.com/archives/C02K2HCH5V4/p1736954974909349)
24 lines
450 B
TypeScript
24 lines
450 B
TypeScript
import React from 'react'
|
|
import { notFound } from 'next/navigation'
|
|
|
|
export const revalidate = 3
|
|
|
|
export default async function Page() {
|
|
await fetch('https://next-data-api.vercel.app/api/random', {
|
|
next: {
|
|
tags: ['explicit-tag'],
|
|
},
|
|
})
|
|
|
|
if (process.env.NEXT_PHASE === 'phase-production-build') {
|
|
notFound()
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<p>/prerendered-not-found/segment-revalidate</p>
|
|
<p>{Date.now()}</p>
|
|
</>
|
|
)
|
|
}
|