From 26799c94a2d17f6420f486d3c53fcf20aeca0936 Mon Sep 17 00:00:00 2001 From: danila Date: Tue, 24 Sep 2024 01:42:50 +0100 Subject: [PATCH] Improve styles --- src/components/MaritimeFlagQuiz.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/MaritimeFlagQuiz.js b/src/components/MaritimeFlagQuiz.js index bf415c8..d69e98d 100644 --- a/src/components/MaritimeFlagQuiz.js +++ b/src/components/MaritimeFlagQuiz.js @@ -44,6 +44,7 @@ const MaritimeFlagQuiz = () => { const [totalQuestions, setTotalQuestions] = useState(0); const [selectedAnswer, setSelectedAnswer] = useState(null); const [progress, setProgress] = useState(0); + const [imageLoaded, setImageLoaded] = useState(false); const shuffleArray = (array) => { for (let i = array.length - 1; i > 0; i--) { @@ -97,17 +98,23 @@ const MaritimeFlagQuiz = () => { Морские сигнальные флаги -
+

Что означает этот флаг?

+ {!imageLoaded && ( +
+
+
+ )} {`${currentFlag.name} setImageLoaded(true)} priority />