diff --git a/src/components/Question.js b/src/components/Question.js
index 57c79cb..77ea2c4 100644
--- a/src/components/Question.js
+++ b/src/components/Question.js
@@ -66,6 +66,13 @@ export default function Question({ question, onChange, index }) {
{possibleAnswers.map((possibleAnswer, i) => {
// {"text":"a. Kétismeretlenes egyenletrendszert használunk.",
// "selectedByUser":true}
+
+ console.log(possibleAnswer)
+ const pa =
+ typeof possibleAnswer === 'string'
+ ? possibleAnswer
+ : possibleAnswer.text
+
return (
@@ -73,15 +80,15 @@ export default function Question({ question, onChange, index }) {
onChange={() => {
onChange({
...question,
- A: possibleAnswer.text,
+ A: pa,
})
}}
- checked={possibleAnswer.text === question.A}
- value={possibleAnswer.text}
+ checked={pa === question.A}
+ value={pa}
type="radio"
name={`possiblea${index ? index : ''}`}
/>
- {possibleAnswer.text}
+ {pa}
{
diff --git a/src/constants.json b/src/constants.json
index cff63be..fd35ff2 100644
--- a/src/constants.json
+++ b/src/constants.json
@@ -1,5 +1,5 @@
{
"siteUrl": "https://qmining.frylabs.net/",
- "apiUrl": "http://localhost:8080/",
+ "apiUrl": "https://api.frylabs.net/",
"maxQuestionsToRender": 250
}