removed forum, todos, added p2p info page & lots of minor changes/fixes

This commit is contained in:
mrfry 2023-03-26 19:16:56 +02:00
parent 32522097c0
commit e2d304c130
28 changed files with 303 additions and 954 deletions

47
src/pages/validation.jsx Normal file
View 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>
)
}