Skip to content

Commit 42bfa15

Browse files
committed
Añadidos iconos a botones en pantalla final
1 parent c008002 commit 42bfa15

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"@tabler/icons-react": "^3.26.0",
1314
"canvas-confetti": "^1.9.3",
1415
"marked": "^14.1.3",
1516
"react": "^18.3.1",

pnpm-lock.yaml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/finalView/score/Score.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useContext } from 'react';
22
import { QuizContext } from '../../../context/QuizContext';
3+
import { IconReload, IconReportAnalytics } from '@tabler/icons-react';
34

45
import './score.css';
56

@@ -19,6 +20,7 @@ export const Score = () => {
1920
: percentage >= 60
2021
? '¡Buen intento!'
2122
: '¡Sigue practicando!';
23+
2224
return (
2325
<article className="score">
2426
<h2 className="message">{message}</h2>
@@ -43,9 +45,13 @@ export const Score = () => {
4345
onClick={() => setShowResults(true)}
4446
hidden={showResults === true}
4547
>
48+
<IconReportAnalytics stroke={2} />
4649
Ver resultados
4750
</button>
48-
<button onClick={handleRestart}>Jugar de nuevo</button>
51+
<button onClick={handleRestart}>
52+
<IconReload stroke={2} />
53+
Jugar de nuevo
54+
</button>
4955
</div>
5056
</article>
5157
);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.buttons {
22
display: flex;
33
column-gap: 1rem;
4+
5+
button {
6+
display: flex;
7+
align-items: center;
8+
column-gap: 0.3rem;
9+
}
410
}

src/context/QuizContextProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { questions } from '../data/questions';
44
import confetti from 'canvas-confetti';
55

66
export const QuizContextProvider = ({ children }) => {
7-
const [currentQuestion, setCurrentQuestion] = useState(0);
7+
const [currentQuestion, setCurrentQuestion] = useState(24);
88
const [selectedOption, setSelectedOption] = useState(null);
99
const [score, setScore] = useState(0);
1010
const [completed, setCompleted] = useState(false);

0 commit comments

Comments
 (0)