-
+
{squares.map((color, index) => (
{
${draggingIndex === index ? "dragging" : ""}
${selectedIndex === index ? "selected" : ""}
${invalidMove === index ? "invalid-move" : ""}
- ${isMobile ? 'mobile-square' : ''}
- ${highlightedSquares.includes(index) ? 'highlighted' : ''}
+ ${isMobile ? "mobile-square" : ""}
`}
style={{ backgroundImage: `url(${color})` }}
{...(!isMobile && {
@@ -287,12 +287,14 @@ const CandyCrush = ({ onFinish }) => {
>
))}
-
diff --git a/src/pages/advent-calendar-2024/components/games/higher-or-lower.jsx b/src/pages/advent-calendar-2024/components/games/higher-or-lower.jsx
index 84c3c0eb6f..0cf9b8eeb7 100644
--- a/src/pages/advent-calendar-2024/components/games/higher-or-lower.jsx
+++ b/src/pages/advent-calendar-2024/components/games/higher-or-lower.jsx
@@ -1,5 +1,4 @@
import {
- Align,
ButtonDanger,
ButtonPrimary,
ButtonSecondary,
@@ -60,7 +59,7 @@ const HigherOrLower = ({ set, data, onFinish }) => {
setScore(savedGame.score);
setStatus("final");
}
- }, []);
+ }, [set]);
const current = data[index];
const next = data[index + 1];
diff --git a/src/pages/advent-calendar-2024/components/games/memory.jsx b/src/pages/advent-calendar-2024/components/games/memory.jsx
index 7a0b7d9069..4762927f30 100644
--- a/src/pages/advent-calendar-2024/components/games/memory.jsx
+++ b/src/pages/advent-calendar-2024/components/games/memory.jsx
@@ -2,7 +2,6 @@ import {
ButtonPrimary,
Text,
Stack,
- Text3,
IconBugFilled,
IconChildFilled,
IconCocktailFilled,
diff --git a/src/pages/advent-calendar-2024/components/games/movie-emoji.jsx b/src/pages/advent-calendar-2024/components/games/movie-emoji.jsx
index 1f267ceaf1..34c32e0a16 100644
--- a/src/pages/advent-calendar-2024/components/games/movie-emoji.jsx
+++ b/src/pages/advent-calendar-2024/components/games/movie-emoji.jsx
@@ -9,8 +9,6 @@ import {
Text5,
Text,
Stack,
- useScreenSize,
- Align,
ButtonSecondary,
} from "@telefonica/mistica";
import { IconCompleted, IconWrong } from "../../assets/icons/icons";
@@ -93,7 +91,6 @@ const EmojiMovies = ({ movies, onFinish }) => {
const [isCorrect, setIsCorrect] = useState(false);
const [score, setScore] = useState(0);
const [gameOver, setGameOver] = useState(false);
- const { isMobile } = useScreenSize();
const gameName = "Emoji Movies";
diff --git a/src/pages/advent-calendar-2024/components/games/simon.jsx b/src/pages/advent-calendar-2024/components/games/simon.jsx
index 944f1586c5..88e13b01e4 100644
--- a/src/pages/advent-calendar-2024/components/games/simon.jsx
+++ b/src/pages/advent-calendar-2024/components/games/simon.jsx
@@ -1,8 +1,14 @@
-import React, { useState, useEffect } from "react";
+import React, { useState, useEffect, useCallback } from "react";
import "./simon.css";
-import { Text, Text3, Text4, ButtonPrimary, Stack, IconButton } from "@telefonica/mistica";
-
+import {
+ Text,
+ Text3,
+ Text4,
+ ButtonPrimary,
+ Stack,
+ IconButton,
+} from "@telefonica/mistica";
import sound1 from "../../../../img/games/1.mp3";
import sound2 from "../../../../img/games/2.mp3";
@@ -17,19 +23,39 @@ import { DecorationPatty } from "../../assets/decorations/decorations";
const colors = ["green", "red", "yellow", "blue"];
const MuteIcon = () => (
-
>
);
};
-
+
export default WordleGame;
diff --git a/src/pages/advent-calendar-2024/components/quizzes/guess-component.jsx b/src/pages/advent-calendar-2024/components/quizzes/guess-component.jsx
index 4048b5e4f8..adb2d4efe6 100644
--- a/src/pages/advent-calendar-2024/components/quizzes/guess-component.jsx
+++ b/src/pages/advent-calendar-2024/components/quizzes/guess-component.jsx
@@ -8,8 +8,6 @@ import {
skinVars,
Text5,
Text,
- Align,
- useScreenSize,
Stack,
} from "@telefonica/mistica";
import { IconCompleted, IconWrong } from "../../assets/icons/icons";
@@ -27,7 +25,7 @@ import { UI_LABEL } from "../../utils/constants";
export const guessComponentSet1 = [
{
id: "nakedCard",
- asset:
,
+ asset:
,
answer: "Naked card",
options: ["Data card", "Media card"],
correctAnswer: "This is the Naked card component!",
@@ -41,7 +39,7 @@ export const guessComponentSet1 = [
},
{
id: "chip",
- asset:
,
+ asset:
,
answer: "Chip",
options: ["Button", "Tag"],
},
@@ -50,19 +48,19 @@ export const guessComponentSet1 = [
export const guessComponentSet2 = [
{
id: "toltiop",
- asset:
,
+ asset:
,
answer: "Tooltip",
options: ["Sheet", "Select"],
},
{
id: "badge",
- asset:
,
+ asset:
,
answer: "Badge",
options: ["Radio button", "Logo"],
},
{
id: "switch",
- asset:
,
+ asset:
,
answer: "Switch",
options: ["Stacking group", "Counter"],
},
diff --git a/src/pages/advent-calendar-2024/components/quizzes/guess-what.jsx b/src/pages/advent-calendar-2024/components/quizzes/guess-what.jsx
index 3f3d4e3b47..7600d57871 100644
--- a/src/pages/advent-calendar-2024/components/quizzes/guess-what.jsx
+++ b/src/pages/advent-calendar-2024/components/quizzes/guess-what.jsx
@@ -13,8 +13,6 @@ import {
IconCocktailRegular,
skinVars,
TextLink,
- Align,
- useScreenSize,
} from "@telefonica/mistica";
import DecorationPatty from "../../assets/decorations/decoration-patty";
import QuizProgress from "../quiz-progress";
@@ -291,7 +289,6 @@ export const GuessWhat = ({ quizType, questions }) => {
const [answers, setAnswers] = useState(Array(questions.length).fill("")); // Store answers dynamically based on the number of questions
const [finalResult, setFinalResult] = useState(null);
const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0); // Track the current question index
- const { isMobile } = useScreenSize();
const quizName = `Guess what ${quizType} you are`;
diff --git a/src/pages/advent-calendar-2024/components/static-content/christmas-movies.jsx b/src/pages/advent-calendar-2024/components/static-content/christmas-movies.jsx
index b51fe95c74..10ca541742 100644
--- a/src/pages/advent-calendar-2024/components/static-content/christmas-movies.jsx
+++ b/src/pages/advent-calendar-2024/components/static-content/christmas-movies.jsx
@@ -9,16 +9,16 @@ import {
import { useState, useEffect } from "react";
import ContentWrapper from "../content-wrapper";
-const ChristmasMovies = () => {
- const titles = [
- "Gremlins",
- "Jingle All The Way",
- "Harry Potter and the Sorcerer's Stone",
- "Resident Evil",
- "Love Actually",
- "Charlie and the Chocolate Factory",
- ];
+const titles = [
+ "Gremlins",
+ "Jingle All The Way",
+ "Harry Potter and the Sorcerer's Stone",
+ "Resident Evil",
+ "Love Actually",
+ "Charlie and the Chocolate Factory",
+];
+const ChristmasMovies = () => {
const [movies, setMovies] = useState({});
const { isMobile } = useScreenSize();
diff --git a/src/pages/advent-calendar-2024/components/static-content/music-list.jsx b/src/pages/advent-calendar-2024/components/static-content/music-list.jsx
index bc42b4bafa..ba0bc3f0f4 100644
--- a/src/pages/advent-calendar-2024/components/static-content/music-list.jsx
+++ b/src/pages/advent-calendar-2024/components/static-content/music-list.jsx
@@ -1,111 +1,107 @@
import {
- Stack,
- Image,
- MediaCard,
- useScreenSize,
- ButtonLink,
- Carousel,
- } from "@telefonica/mistica";
- import ContentWrapper from "../content-wrapper";
-
- const MusicLists = () => {
- const { isMobile } = useScreenSize();
-
- return (
-
-
-
-
-
- }
- title="Christmas Chill"
- media={
-
- }
- buttonLink={
-
- Listen
-
- }
- />,
-
-
-
- }
- title="Punk Christmas"
- media={
-
- }
- buttonLink={
-
- Listen
-
- }
- />,
-
+ Stack,
+ Image,
+ MediaCard,
+ ButtonLink,
+ Carousel,
+} from "@telefonica/mistica";
+import ContentWrapper from "../content-wrapper";
+
+const MusicLists = () => {
+ return (
+
+
+
}
- title="Electronic Christmas"
- media={
-
- }
- buttonLink={
-
- Listen
-
- }
- />,
- ]}
- />
-
-
- );
- };
-
- export default MusicLists;
-
\ No newline at end of file
+ title="Christmas Chill"
+ media={
+
+ }
+ buttonLink={
+
+ Listen
+
+ }
+ />,
+
+
+
+ }
+ title="Punk Christmas"
+ media={
+
+ }
+ buttonLink={
+
+ Listen
+
+ }
+ />,
+
+
+
+ }
+ title="Electronic Christmas"
+ media={
+
+ }
+ buttonLink={
+
+ Listen
+
+ }
+ />,
+ ]}
+ />
+
+
+ );
+};
+
+export default MusicLists;
diff --git a/src/pages/advent-calendar-2024/components/static-content/top-contributors.jsx b/src/pages/advent-calendar-2024/components/static-content/top-contributors.jsx
index 06e3e160c6..286a08e528 100644
--- a/src/pages/advent-calendar-2024/components/static-content/top-contributors.jsx
+++ b/src/pages/advent-calendar-2024/components/static-content/top-contributors.jsx
@@ -1,17 +1,13 @@
import {
- Align,
Avatar,
Stack,
Text4,
BoxedRowList,
BoxedRow,
- useScreenSize,
} from "@telefonica/mistica";
import ContentWrapper from "../content-wrapper";
const TopContributors = () => {
- const { isMobile } = useScreenSize();
-
return (