Added cors2
This commit is contained in:
parent
e932e8760a
commit
ddfe087203
@ -31,7 +31,7 @@ useEffect(() => {
|
|||||||
setQuestions(customQuestions);
|
setQuestions(customQuestions);
|
||||||
sessionStorage.setItem("quiz_questions", JSON.stringify(customQuestions));
|
sessionStorage.setItem("quiz_questions", JSON.stringify(customQuestions));
|
||||||
} else {
|
} else {
|
||||||
fetch(`http://localhost:3000/api/questions/${mode}`)
|
fetch(`/api/questions/${mode}`)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const shuffled = data.sort(() => 0.5 - Math.random()).slice(0, 30);
|
const shuffled = data.sort(() => 0.5 - Math.random()).slice(0, 30);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user