displaying behaviour sing on top of cover
This commit is contained in:
parent
dc29df4b54
commit
f2757ad875
|
|
@ -21,10 +21,11 @@ export default function GameAnwerExplanation({ questionId }) {
|
||||||
const answerExplanation =
|
const answerExplanation =
|
||||||
contextGameDatas.gameObjects[questionId].attrs.objectBehaviourDescription ??
|
contextGameDatas.gameObjects[questionId].attrs.objectBehaviourDescription ??
|
||||||
"Pas d'explication pour cette question";
|
"Pas d'explication pour cette question";
|
||||||
|
const answerBehaviour = answer.correctAnswer ?? "";
|
||||||
const objectPictureUrl = contextGameDatas.gameObjects[questionId].attrs.objectPictureUrl;
|
const objectPictureUrl = contextGameDatas.gameObjects[questionId].attrs.objectPictureUrl;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='modal-content-container modal-content-container--grided answer-explanation-container'>
|
<div className='modal-content-container modal-content-container--grided answer-explanation-container answer-explanation-container'>
|
||||||
<div className='modal-content-container__content'>
|
<div className='modal-content-container__content'>
|
||||||
{answer.userAnsweredCorrectly === true && (
|
{answer.userAnsweredCorrectly === true && (
|
||||||
<>
|
<>
|
||||||
|
|
@ -70,7 +71,8 @@ export default function GameAnwerExplanation({ questionId }) {
|
||||||
className='continue-game cta cta--construction cta--round cta--button-icon cta--next'
|
className='continue-game cta cta--construction cta--round cta--button-icon cta--next'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='modal-content-container__cover'>
|
<div
|
||||||
|
className={`modal-content-container__cover modal-content-container__cover--${answerBehaviour}`}>
|
||||||
<img src={objectPictureUrl} alt='' />
|
<img src={objectPictureUrl} alt='' />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user