diff --git a/src/components/Question.js b/src/components/Question.js index 00984ab..57c79cb 100644 --- a/src/components/Question.js +++ b/src/components/Question.js @@ -64,6 +64,8 @@ export default function Question({ question, onChange, index }) {
Lehetséges válaszok:
{possibleAnswers.map((possibleAnswer, i) => { + // {"text":"a. Kétismeretlenes egyenletrendszert használunk.", + // "selectedByUser":true} return (
@@ -71,15 +73,15 @@ export default function Question({ question, onChange, index }) { onChange={() => { onChange({ ...question, - A: possibleAnswer, + A: possibleAnswer.text, }) }} - checked={possibleAnswer === question.A} - value={possibleAnswer} + checked={possibleAnswer.text === question.A} + value={possibleAnswer.text} type="radio" name={`possiblea${index ? index : ''}`} /> - {possibleAnswer} + {possibleAnswer.text}
{ diff --git a/src/constants.json b/src/constants.json index 606e79c..cff63be 100644 --- a/src/constants.json +++ b/src/constants.json @@ -1,5 +1,5 @@ { - "apiUrl": "https://api.frylabs.net/", "siteUrl": "https://qmining.frylabs.net/", + "apiUrl": "http://localhost:8080/", "maxQuestionsToRender": 250 } diff --git a/src/defaultStyles.css b/src/defaultStyles.css index de63f00..092c87b 100644 --- a/src/defaultStyles.css +++ b/src/defaultStyles.css @@ -167,5 +167,4 @@ select { } select:hover { - border: 1px solid #99f; } diff --git a/src/pages/index.js b/src/pages/index.js index 0cf543b..9bf18b5 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -70,7 +70,7 @@ const Infos = ({ onClick, renderOKButton }) => { const fetchDbs = () => { return new Promise((resolve) => { - fetch(`${constants.apiUrl}getdbs`, { + fetch(`${constants.apiUrl}getDbs`, { credentials: 'include', }) .then((resp) => {