Skip to content

Commit 6f8781b

Browse files
committed
perf: remove redundant force-dynamic configs, add loading skeleton, drop nprogress
- Remove force-dynamic + revalidate=0 from (main)/layout.tsx and 13 child pages/layouts — parent route already dynamic via next-intl getLocale(), and the explicit declarations prevented CDN caching of child ISR routes - Add loading.tsx skeleton to (main)/(public) for instant client-nav feedback - Replace nprogress wrapper hook with direct re-export from next/navigation - Remove nprogress dependency and its usage in ActiveOrganizationProvider
1 parent 7beac67 commit 6f8781b

18 files changed

Lines changed: 40 additions & 81 deletions

File tree

‎apps/web/package.json‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@
116116
"jszip": "^3.10.1",
117117
"lucide-react": "^0.542.0",
118118
"nanoid": "^5.1.5",
119-
"next": "16.1.6",
119+
"next": "16.2.4",
120120
"next-intl": "4.8.3",
121121
"next-themes": "^0.4.6",
122122
"nodemailer": "^7.0.5",
123-
"nprogress": "^0.2.0",
124123
"nuqs": "^2.4.3",
125124
"openai": "^6.19.0",
126125
"openapi-merge": "^1.3.3",
@@ -160,13 +159,13 @@
160159
},
161160
"devDependencies": {
162161
"@biomejs/biome": "1.9.4",
163-
"@prisma/adapter-pg": "^7.0.1",
164162
"@content-collections/core": "^0.8.2",
165163
"@content-collections/mdx": "^0.2.2",
166164
"@content-collections/next": "^0.2.6",
167165
"@lingual/i18n-check": "^0.8.5",
168166
"@mdx-js/mdx": "^3.1.0",
169167
"@playwright/test": "^1.54.1",
168+
"@prisma/adapter-pg": "^7.0.1",
170169
"@shikijs/rehype": "^3.8.0",
171170
"@tailwindcss/postcss": "^4.1.11",
172171
"@types/dompurify": "^3.2.0",
@@ -175,7 +174,6 @@
175174
"@types/mdx": "^2.0.13",
176175
"@types/node": "22.15.14",
177176
"@types/nodemailer": "^6.4.17",
178-
"@types/nprogress": "^0.2.3",
179177
"@types/qrcode": "^1.5.6",
180178
"@types/react": "19.1.3",
181179
"@types/react-dom": "19.1.3",

‎apps/web/src/app/(app)/auth/bind-phone/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { BindPhoneForm } from "@account/auth/components/BindPhoneForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/email-verified/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import { getTranslations } from "next-intl/server";
33
import { Suspense } from "react";
44
import { EmailVerifiedClient } from "./email-verified-client";
55

6-
export const dynamic = "force-dynamic";
7-
export const revalidate = 0;
8-
96
export async function generateMetadata() {
107
const t = await getTranslations();
118

‎apps/web/src/app/(app)/auth/forgot-password/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { ForgotPasswordForm } from "@account/auth/components/ForgotPasswordForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/layout.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { SessionProvider } from "@shared/auth/components/SessionProvider";
22
import { AuthWrapper } from "@shared/components/AuthWrapper";
33
import type { PropsWithChildren } from "react";
44

5-
export const dynamic = "force-dynamic";
6-
export const revalidate = 0;
7-
85
export default function AuthLayout({ children }: PropsWithChildren) {
96
return (
107
<SessionProvider>

‎apps/web/src/app/(app)/auth/login/email/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { EmailLoginForm } from "@account/auth/components/EmailLoginForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/login/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { LoginMethodSelector } from "@account/auth/components/LoginMethodSelector";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/login/phone/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { PhoneLoginForm } from "@account/auth/components/PhoneLoginForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/login/phone/verify/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { PhoneVerifyForm } from "@account/auth/components/PhoneVerifyForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

‎apps/web/src/app/(app)/auth/reset-password/page.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { ResetPasswordForm } from "@account/auth/components/ResetPasswordForm";
22
import { getTranslations } from "next-intl/server";
33

4-
export const dynamic = "force-dynamic";
5-
export const revalidate = 0;
6-
74
export async function generateMetadata() {
85
const t = await getTranslations();
96

0 commit comments

Comments
 (0)