mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: using env for tester key
This commit is contained in:
parent
79aa4f9159
commit
994ea56af7
@ -16,11 +16,6 @@ COPY . /usr/src/app
|
||||
|
||||
RUN printf "NEXT_PUBLIC_COMMIT_HASH=$(git rev-parse HEAD)\nNEXT_PUBLIC_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')" > .env.local
|
||||
|
||||
# secret.json
|
||||
|
||||
RUN echo "{\"tester\": \"${TESTER_KEY}\"}" > secret.json
|
||||
|
||||
|
||||
# Building app
|
||||
RUN yarn build
|
||||
|
||||
|
||||
@ -9,8 +9,6 @@ const Navbar = dynamic(()=> import('@components/Navbar'))
|
||||
|
||||
import Crypto from 'crypto'
|
||||
|
||||
import secret from '../secret.json'
|
||||
|
||||
import 'core-js/es/promise'
|
||||
import 'core-js/es/set'
|
||||
import 'core-js/es/map'
|
||||
@ -65,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 === Crypto.createHmac('sha256', betaKey ?? '').digest('hex') ? <Component {...pageProps} /> : <div className='text-center py-40 px-10'>
|
||||
process.env.NEXT_PUBLIC_TESTER_KEY === 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