mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
removed forum, todos, added p2p info page & lots of minor changes/fixes
This commit is contained in:
parent
32522097c0
commit
e2d304c130
28 changed files with 303 additions and 954 deletions
47
src/pages/validation.jsx
Normal file
47
src/pages/validation.jsx
Normal file
|
@ -0,0 +1,47 @@
|
|||
import React, { useState, useEffect } from 'react'
|
||||
|
||||
import Header from '../components/header'
|
||||
|
||||
import styles from './validation.module.css'
|
||||
import constants from '../constants.json'
|
||||
|
||||
function fetchValidation() {
|
||||
return new Promise((resolve) => {
|
||||
fetch(`${constants.apiUrl}validationtoken`, {
|
||||
credentials: 'include',
|
||||
})
|
||||
.then((resp) => {
|
||||
return resp.json()
|
||||
})
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default function Validation() {
|
||||
const [token, setToken] = React.useState('')
|
||||
|
||||
useEffect(() => {
|
||||
fetchValidation().then((res) => {
|
||||
setToken(res.key)
|
||||
})
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header title={'Validálás'} />
|
||||
<div className={'pageHeader'}>
|
||||
<h1>Validálás</h1>
|
||||
</div>
|
||||
<center>
|
||||
<div className={styles.descrip}>
|
||||
Különböző okokból kellhet, hogy bizonyítsd hogy az oldalhoz van
|
||||
hozzáférésed. Ebben az esetben ezzel a tokennel tudod: TODO: normális
|
||||
duma
|
||||
</div>
|
||||
{token && <div className={styles.tokenContainer}>{token}</div>}
|
||||
</center>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue