chore: hide footer at developers

This commit is contained in:
wonderlandpark 2021-03-21 22:21:34 +09:00
parent 08cc81ba90
commit f96b42665b

View File

@ -1,6 +1,7 @@
import Head from 'next/head'
import type { AppProps } from 'next/app'
import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { GlobalHotKeys } from 'react-hotkeys'
@ -31,6 +32,7 @@ export default function App({ Component, pageProps, err }: KoreanbotsProps): JSX
const [ betaKey, setBetaKey ] = useState('')
const [ shortcutModal, setShortcutModal ] = useState(false)
const [ theme, setTheme ] = useState<Theme>('system')
const router = useRouter()
useEffect(() => {
setBetaKey(localStorage.betaKey)
@ -63,7 +65,7 @@ export default function App({ Component, pageProps, err }: KoreanbotsProps): JSX
<meta name='theme-color' content='#3366FF' />
</Head>
<Navbar />
<div className='iu-is-the-best h-full text-black dark:text-gray-100 dark:bg-discord-dark bg-white'>
<div className='iu-is-the-best min-h-screen text-black dark:text-gray-100 dark:bg-discord-dark bg-white'>
{
process.env.NEXT_PUBLIC_TESTER_KEY === Crypto.createHmac('sha256', betaKey ?? '').digest('hex') ?
<Component {...pageProps} err={err} theme={theme} setTheme={setTheme} /> :
@ -72,8 +74,10 @@ export default function App({ Component, pageProps, err }: KoreanbotsProps): JSX
<input value={betaKey} name='field_name' className='text-black border outline-none px-4 py-2 rounded-2xl' type='text' placeholder='테스터 키' onChange={(e)=> { localStorage.setItem('betaKey', e.target.value); setBetaKey(e.target.value) }} />
</div>
}
<Footer theme={theme} setTheme={setTheme} />
</div>
{
!(router.pathname.startsWith('/developers')) && <Footer theme={theme} setTheme={setTheme} />
}
<Modal full isOpen={shortcutModal} onClose={() => setShortcutModal(false)} dark={theme === 'dark'} header='단축키 안내'>
<div className='px-3 h-80'>
<h3 className='text-md font-semibold'></h3>