From ac7a82c98dc9289f390eac2b56ee9cccb5998334 Mon Sep 17 00:00:00 2001 From: MORGANE DEBARGE Date: Fri, 10 Nov 2023 09:53:55 +0100 Subject: [PATCH] ajout d'un coef sur le score du jeu et correction css --- frontend/src/components/Jeu.jsx | 6 +++++- frontend/src/components/Victory.jsx | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Jeu.jsx b/frontend/src/components/Jeu.jsx index 29aa1d5..6975fab 100644 --- a/frontend/src/components/Jeu.jsx +++ b/frontend/src/components/Jeu.jsx @@ -195,7 +195,11 @@ function Jeu() { className="gameOver text-white font-irish w-full h-full flex justify-center items-center text-9xl max-sm:text-7xl max-sm:pb-32" > - {score === 200 ? : } + {score === 200 ? ( + + ) : ( + + )} )} diff --git a/frontend/src/components/Victory.jsx b/frontend/src/components/Victory.jsx index 5ac0bd7..79e1bfb 100644 --- a/frontend/src/components/Victory.jsx +++ b/frontend/src/components/Victory.jsx @@ -1,7 +1,7 @@ import PropTypes from "prop-types"; import { motion } from "framer-motion"; -function Victory({ result }) { +function Victory({ result, pV, score }) { if (result) { return ( - Victory! +

Victory!

+

Your score is {score * pV}

); } @@ -18,6 +19,8 @@ function Victory({ result }) { Victory.propTypes = { result: PropTypes.bool.isRequired, + pV: PropTypes.number.isRequired, + score: PropTypes.number.isRequired, }; export default Victory;