chore: add a log to printout NEXT_PUBLIC env

This commit is contained in:
Tianzhou Chen
2023-07-27 01:34:39 +08:00
parent 076a4a8b78
commit f8abe4e21f

View File

@ -23,6 +23,10 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps<{ s
const { i18n } = useTranslation();
const settingStore = useSettingStore();
// Check whether those NEXT_PUBLIC_ envs are properly exposed in frontend.
// See https://github.com/vercel/next.js/discussions/17641
console.log("Use database:", process.env.NEXT_PUBLIC_DATABASE_LESS);
useEffect(() => {
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
const handleColorSchemeChange = (e: MediaQueryListEvent) => {