mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added tabs.json
This commit is contained in:
parent
b7dcc360bc
commit
8a1149d223
5 changed files with 39 additions and 40 deletions
|
@ -6,7 +6,6 @@ import Layout from '../components/layout'
|
|||
import constants from '../constants.json'
|
||||
|
||||
export default function UserQuestions (props) {
|
||||
const [loaded, setLoaded] = useState(false)
|
||||
const [qa, setQa] = useState(null)
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -17,11 +16,10 @@ export default function UserQuestions (props) {
|
|||
})
|
||||
.then((data) => {
|
||||
setQa(data)
|
||||
setLoaded(true)
|
||||
})
|
||||
}, [loaded])
|
||||
}, [])
|
||||
|
||||
if (loaded) {
|
||||
if (qa) {
|
||||
let questions = Object.keys(qa).map((key, i) => {
|
||||
let q = qa[key]
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue