返回 CodeWhale
loading.tsx
根目录 / web / app / [locale] / admin / loading.tsx
1 import { LoadingRoute } from "@/components/route-state";
2
3 /**
4 * Segment loading boundary for the one request-time segment. /admin is
5 * `force-dynamic` and reads KV on every request, so a slow read streams the
6 * shared loading plate instead of a blank field.
7 *
8 * Deliberately the only loading.tsx under the locale root: a boundary on a
9 * statically generated or ISR segment (docs, feed, digest, roadmap) makes the
10 * served HTML carry the fallback with the real body in a hidden slot that
11 * only a script swaps in — every no-JS reader and crawler would see
12 * "Loading…" in place of the article. A root boundary would also turn the
13 * catch-all's 404 into a streamed 200.
14 */
15 export default function Loading() {
16 return (
17 <div className="route-state">
18 <LoadingRoute />
19 </div>
20 );
21 }
22
22 lines Plain Text