mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### Why? Some app-static prerendered not-found fixtures still fetched `https://next-data-api.vercel.app/api/random`, which now points at a different static deployment and returns 404 for the API route. The rest of the test suite uses `https://next-data-api-endpoint.vercel.app` for this shared data API. ### How? Updated the two stale fixture fetches to use `https://next-data-api-endpoint.vercel.app/api/random`. ### Verification - `rg "next-data-api\.vercel\.app" test` returned no matches - `git diff --check` passed for the changed files - Not run: full e2e suite (URL-only fixture change) - Not run: prettier/eslint (local `node_modules` is missing, so `prettier` and `eslint` were not available) <!-- NEXT_JS_LLM_PR -->
24 lines
459 B
TypeScript
24 lines
459 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-endpoint.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>
|
|
</>
|
|
)
|
|
}
|