From dc2a184da25a0d114bff4a0eab669acaa792e200 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 18 May 2022 08:54:55 -0400 Subject: [PATCH] Try integrating once more --- common/envs/constants.ts | 2 +- web/components/page.tsx | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/common/envs/constants.ts b/common/envs/constants.ts index dc753021..a09b3f5c 100644 --- a/common/envs/constants.ts +++ b/common/envs/constants.ts @@ -2,7 +2,7 @@ import { DEV_CONFIG } from './dev' import { EnvConfig, PROD_CONFIG } from './prod' import { THEOREMONE_CONFIG } from './theoremone' -export const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'PROD' +export const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'DEV' const CONFIGS = { PROD: PROD_CONFIG, diff --git a/web/components/page.tsx b/web/components/page.tsx index 1bb88746..01102ace 100644 --- a/web/components/page.tsx +++ b/web/components/page.tsx @@ -12,14 +12,11 @@ export function Page(props: { children?: any }) { const { margin, assertUser, children, rightSidebar, suspend } = props - useEffect(() => { - if (typeof document !== 'undefined') { - // This seems to work... - console.log(document) - // But not this... - initPreviews() - } - }, []) + + if (typeof document !== 'undefined') { + // Seems to be undefined; because of https://i.imgur.com/4bMQ8rA.png ? + console.log(initPreviews) + } return ( <>