Skip to content

Commit

Permalink
fixed questions imagse bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adriiglz committed Apr 1, 2024
1 parent a4c61b7 commit 797a1ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion questionservice/question-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ app.post('/imgs/answer', (req, res) => {
correct: "true"
})
} else {
res.status(400).json({
res.status(200).json({
correct: "false",
country: `${imgToAssociatedMap.get(answer)}`
})
Expand Down
10 changes: 4 additions & 6 deletions webapp/src/components/Question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ const Question = (props) => {
<h1 className="font-bold text-3xl text-gray-800 pl-8">{question.question}</h1>
<div className="grid grid-cols-2 mt-10 item">
{question.images.map( image => (
<div className="rounded-xl mx-8 my-8">
<button className="transition-transform transform-gpu hover:scale-105">
<img src={image} alt='Loading image...' className="rounded-lg max-h-50 object-contain shadow-md"
onClick={() => answerQuestion(image)}></img>
</button>
</div>
<button className="transition-transform transform-gpu hover:scale-105 rounded-xl mx-8 my-8 max-h-52 max-w-80">
<img src={image} alt='Loading image...' className="rounded-lg object-contain shadow-md"
onClick={() => answerQuestion(image)}></img>
</button>
))}
</div>
</>
Expand Down

0 comments on commit 797a1ef

Please sign in to comment.