perf: migrate pages to Cache Components via root layout opt-out
Remove the per-route 'export const instant = false' opt-outs now that the root layout carries the single Cache Components opt-out. Child pages inherit the opt-out, so admin/mod/radio leaf pages that only access cached or DB data stay instant while runtime-dependent pages remain dynamic. Update the staff-smoke contract test to assert the root-layout contract.
This commit is contained in:
1 parent
b25e7b00dd
commit
51ef7602ca
203 files changed
+16
-811
No files matched your search
@@ -4,10 +4,6 @@ import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
import { getAuditLogs } from "@/lib/services/audit";
|
||||
import { AuditTable } from "./audit-table";
|
||||
|
||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||
export const instant = false;
|
||||
|
||||
export default async function AuditLogsPage({
|
||||
params: paramsPromise,
|
||||
searchParams,
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { loadChatLogList } from "../_lib/load-ignored-logs";
|
||||
import { ChatTable } from "./chat-table";
|
||||
|
||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||
export const instant = false;
|
||||
|
||||
export default async function ChatLogsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { loadCommandLogList } from "../_lib/load-ignored-logs";
|
||||
import { CommandsTable } from "./commands-table";
|
||||
|
||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||
export const instant = false;
|
||||
|
||||
export default async function CommandLogsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
|
||||
@@ -19,10 +19,6 @@ import { formatDate } from "@/lib/format-date";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
import { StaffActivitiesTable } from "./staff-activities-table";
|
||||
|
||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||
export const instant = false;
|
||||
|
||||
const SORT_MAP = {
|
||||
when: StaffActivities.createdAt,
|
||||
staff: StaffActivities.userId,
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { loadTradeLogList } from "../_lib/load-ignored-logs";
|
||||
import { TradesTable } from "./trades-table";
|
||||
|
||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
||||
export const instant = false;
|
||||
|
||||
export default async function TradeLogsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
|
||||
Reference in new issue
Block a user