mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Tweaks the environment label logic to only use label things as `Prefetch` if there's a runtime prefetch config. If there's none, we label it as `Prefetchable` instead. --------- Co-authored-by: Josh Story <[email protected]>
11 lines
384 B
TypeScript
11 lines
384 B
TypeScript
import { fetchCachedRandom, getCachedData } from '../data-fetching'
|
|
|
|
// Deliberately using the same cache keys as the page.
|
|
const CACHE_KEY = __dirname + '/__PAGE__'
|
|
|
|
export default async function Loading() {
|
|
await fetchCachedRandom(CACHE_KEY) // Mirrors `CachedFetchingComponent`
|
|
await getCachedData(CACHE_KEY) // Mirrors `CachedDataComponent`
|
|
return <main>loading...</main>
|
|
}
|