Hide 404 for private Manifolds

This commit is contained in:
Austin Chen 2022-03-01 16:36:52 -08:00
parent 20d18f3588
commit c8add8ea51
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@ const FIREBASE_CONFIGS = {
},
}
const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'PROD'
export const IS_PRIVATE_MANIFOLD = !['PROD', 'DEV'].includes(ENV)
// @ts-ignore
const firebaseConfig = FIREBASE_CONFIGS[ENV]
// Initialize Firebase

View File

@ -1,8 +1,14 @@
import { useEffect } from 'gridjs'
import { Page } from '../components/page'
import { Title } from '../components/title'
import { IS_PRIVATE_MANIFOLD } from '../lib/firebase/init'
export default function Custom404() {
if (IS_PRIVATE_MANIFOLD) {
// Since private Manifolds are client-side rendered, they'll blink the 404
// So we just show a blank page here:
return <Page></Page>
}
return (
<Page>
<div className="flex h-full flex-col items-center justify-center">