mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
fix: prevent with betaKey state missing
This commit is contained in:
parent
ba4bbd0d7d
commit
4e893c7a1a
@ -5,6 +5,7 @@ import { useEffect, useState } from 'react'
|
||||
|
||||
import Footer from '../components/Footer'
|
||||
import Navbar from '../components/Navbar'
|
||||
import Crypto from 'crypto'
|
||||
|
||||
import secret from '../secret.json'
|
||||
|
||||
@ -62,7 +63,7 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element {
|
||||
<Navbar />
|
||||
<div className='iu-is-the-best h-full text-black dark:text-gray-100 dark:bg-discord-dark bg-white'>
|
||||
{
|
||||
secret.tester === betaKey ? <Component {...pageProps} /> : <div className='text-center py-40 px-10'>
|
||||
secret.tester === Crypto.createHmac('sha256', betaKey ?? '').digest('hex') ? <Component {...pageProps} /> : <div className='text-center py-40 px-10'>
|
||||
<h1 className='text-3xl font-bold'>주어진 테스터키를 입력해주세요.</h1><br/>
|
||||
<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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user