From 60e09d415371a43ae0dc712afb8a124036b14b99 Mon Sep 17 00:00:00 2001 From: "Au Chen Xi, Gabriel" Date: Sat, 12 Oct 2024 10:07:02 +0800 Subject: [PATCH] Fix build problem --- gabau.github.io/src/components/games/Pong.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gabau.github.io/src/components/games/Pong.tsx b/gabau.github.io/src/components/games/Pong.tsx index 94a679e..448738a 100644 --- a/gabau.github.io/src/components/games/Pong.tsx +++ b/gabau.github.io/src/components/games/Pong.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useContext } from "react"; +import React, { useEffect, useState, useContext, SetStateAction } from "react"; import { Stage, Graphics, Text } from "@pixi/react"; import * as PIXI from "pixi.js"; import ThemeContext from "../../context/ThemeContext"; @@ -36,7 +36,7 @@ const Pong: React.FC = () => { const [leftScore, setLeftScore] = useState(0); const [rightScore, setRightScore] = useState(0); - const setBallSpeed = (f: (v: number) => void) => { + const setBallSpeed = (f: SetStateAction) => { // if it has been set recently if (recentlySetSpeed) return; setBallSpeedInner(f);