You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/layouts/demo/components/DemoNav.tsx
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,9 @@ type Props = {};
55
55
* XXX Demo component, not meant to be modified. It's a copy of the core implementation, so the demo keeps working even the core implementation changes.
logger.debug(`Pre-evaluation (prefetching of the static translations at build time) is disabled in development mode for a better developer experience.`);
44
-
return{};
45
-
}
22
+
// if (process.env.NODE_ENV !== 'development') {
23
+
// logger.debug(`Pre-evaluation (prefetching of the static translations at build time) is starting.`);
// logger.debug(`Pre-evaluation (prefetching of the static translations at build time) is disabled in development mode for a better developer experience.`);
// When preview mode is enabled or working locally, we want to make real-time API requests to get up-to-date data
49
-
// Because using the "next-plugin-preval" plugin worsen developer experience in dev - See https://github.com/UnlyEd/next-right-now/discussions/335#discussioncomment-792821
50
-
returnawaitfetchTranslations(lang);
51
-
}else{
52
-
// Otherwise, we fallback to the app-wide shared/static data (stale)
53
-
returnawaitgetStaticLocizeTranslations(lang);
54
-
}
47
+
// if (isPreviewMode || process.env.NODE_ENV === 'development') {
48
+
// // When preview mode is enabled or working locally, we want to make real-time API requests to get up-to-date data
49
+
// // Because using the "next-plugin-preval" plugin worsen developer experience in dev - See https://github.com/UnlyEd/next-right-now/discussions/335#discussioncomment-792821
50
+
// return await fetchTranslations(lang);
51
+
// } else {
52
+
// // Otherwise, we fallback to the app-wide shared/static data (stale)
0 commit comments