diff --git a/src/App.js b/src/App.js index 6c62e23..9605677 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,7 @@ function App() { const location = useLocation(); return ( + } /> } /> diff --git a/src/assets/css/components/GameAnswerExplanation.scss b/src/assets/css/components/GameAnswerExplanation.scss index ceba141..0b75cdf 100644 --- a/src/assets/css/components/GameAnswerExplanation.scss +++ b/src/assets/css/components/GameAnswerExplanation.scss @@ -1,35 +1,36 @@ -.answer-explanation { - @apply p-8 flex gap-x-8; - &__type { - @apply text-white text-4xl w-fit px-6 py-1; - transform: skew(-2deg) rotate(-2deg); - &--success, - &--success .success-icon { - @apply bg-green-600; - } - &--error, - &--error .success-icon { - @apply bg-red-400; +.answer-explanation-container { + .answer-explanation { + @apply p-8 flex gap-x-8; + &__type { + @apply text-white text-4xl w-fit px-6 py-1; + transform: skew(-2deg) rotate(-2deg); + &--success, + &--success .success-icon { + @apply bg-green-600; + } + &--error, + &--error .success-icon { + @apply bg-red-400; + } + + .success-icon { + @apply w-6 h-6 object-contain object-center absolute top-0 right-0 rounded-full p-2 border-solid border-white border-4; + transform: translate(50%, -50%); + } } - .success-icon { - @apply w-6 h-6 object-contain object-center absolute top-0 right-0 rounded-full p-2 border-solid border-white border-4; - transform: translate(50%, -50%); + &__title { + @apply text-5xl py-8; } - } - &__title { - @apply text-5xl py-8; - } - - &__cover { - @apply w-1/2; - img { - @apply h-auto object-contain object-center; + &__cover { + @apply w-1/2; + img { + @apply h-auto object-contain object-center; + } } } .continue-game { - @apply absolute bottom-0 left-1/2; - translate: -50% 50%; + @apply mt-8; } } diff --git a/src/assets/css/components/ui/Modal.scss b/src/assets/css/components/ui/Modal.scss index 09ddfca..6bbfee2 100644 --- a/src/assets/css/components/ui/Modal.scss +++ b/src/assets/css/components/ui/Modal.scss @@ -29,7 +29,7 @@ dialog { .modal-content-container { @apply w-full - p-8 grid gap-x-8; + p-8 px-24 grid gap-x-8; @apply pt-28 pb-16; box-sizing: border-box; diff --git a/src/assets/css/pages/Rating.scss b/src/assets/css/pages/Rating.scss index 66d41b7..7d12f99 100644 --- a/src/assets/css/pages/Rating.scss +++ b/src/assets/css/pages/Rating.scss @@ -92,4 +92,8 @@ .cta--back { @apply mt-3 mx-auto; } + .cta--back[disabled] { + @apply bg-slate-300; + cursor: not-allowed; + } } diff --git a/src/assets/css/pages/Results.scss b/src/assets/css/pages/Results.scss index 0aa37ac..eb6fdf9 100644 --- a/src/assets/css/pages/Results.scss +++ b/src/assets/css/pages/Results.scss @@ -7,7 +7,7 @@ } &__celebration-confettis-fixe { @apply absolute top-0 left-0 z-10 w-full; - + pointer-events: none; // svg > g { // @apply bg-purple-900 opacity-100 w-full; // } diff --git a/src/components/AnimatedPage.jsx b/src/components/AnimatedPage.jsx index 36194d0..4df1125 100644 --- a/src/components/AnimatedPage.jsx +++ b/src/components/AnimatedPage.jsx @@ -4,7 +4,7 @@ import { motion } from "framer-motion"; export default function AnimatedPage({ children, className }) { const location = useLocation(); - + const isNext = location.state && location.state.isNext; const isPrev = location.state && location.state.isPrev; const isGoingNext = location.state && location.state.isGoingNext; @@ -39,6 +39,7 @@ export default function AnimatedPage({ children, className }) { exit={animationParameters.exit} transition={{ duration: 0.4, ease: "easeOut" }}> {children} +

qsqsdds

); } diff --git a/src/components/game/GameAnswerExplanation.jsx b/src/components/game/GameAnswerExplanation.jsx index 4bf8608..23e3b4e 100644 --- a/src/components/game/GameAnswerExplanation.jsx +++ b/src/components/game/GameAnswerExplanation.jsx @@ -19,7 +19,7 @@ export default function GameAnwerExplanation({ questionId }) { contextGameDatas.gameObjects[questionId].attrs.objectBehaviourDescription ?? "Pas d'explication pour cette question"; const objectPictureUrl = contextGameDatas.gameObjects[questionId].attrs.objectPictureUrl; - console.log(answer); + return (
diff --git a/src/components/ui/LanguageSelect.jsx b/src/components/ui/LanguageSelect.jsx index b8629b8..ea6ee0b 100644 --- a/src/components/ui/LanguageSelect.jsx +++ b/src/components/ui/LanguageSelect.jsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { useUser } from "../../hooks/useUser"; export default function LanguageSelect() { - const { language, setLanguage, screensTranslations } = useUser(); + const { language, changeUserLanguage, screensTranslations } = useUser(); const [isSubmenuOpen, setIsSubmenuOpen] = useState(false); if (!screensTranslations || !screensTranslations.ui) return

loading translations…

; @@ -14,7 +14,7 @@ export default function LanguageSelect() { function chooseLanguage(lang) { setIsSubmenuOpen(false); - setLanguage(lang); + changeUserLanguage(lang); } const supportedLanguages = ["FR", "EN", "ES", "PT", "DE", "DA", "FI", "PL", "CS", "SK", "MY"]; diff --git a/src/components/ui/Menu.jsx b/src/components/ui/Menu.jsx index 3dfaaf7..dfcb623 100644 --- a/src/components/ui/Menu.jsx +++ b/src/components/ui/Menu.jsx @@ -2,22 +2,23 @@ import { NavLink } from "react-router-dom"; import { useLocation } from "react-router-dom"; import { useUser } from "../../hooks/useUser"; import LanguageSelect from "./LanguageSelect"; -export default function Menu() { +export default function Nav() { let location = useLocation(); const { language, changeLanguage } = useUser(); return (