This commit is contained in:
Viktor Rådberg
2024-01-27 09:32:00 +01:00
parent 51f9c4d20e
commit 724dcf086c
7 changed files with 21 additions and 23 deletions

View File

@@ -47,6 +47,7 @@ type ExtraCounterProps = {
type: CounterType;
setCounterTotal: (updatedCounterTotal: number, type: CounterType) => void;
rotation: number;
isSide: boolean;
playerIndex: number;
};
@@ -56,15 +57,13 @@ const ExtraCounter = ({
setCounterTotal,
type,
rotation,
isSide,
playerIndex,
}: ExtraCounterProps) => {
const timeoutRef = useRef<NodeJS.Timeout | undefined>(undefined);
const [timeoutFinished, setTimeoutFinished] = useState(false);
const [hasPressedDown, setHasPressedDown] = useState(false);
const isSide =
rotation === Rotation.Side || rotation === Rotation.SideFlipped;
const handleCountChange = (increment: number) => {
if (!counterTotal) {
setCounterTotal(increment, type);