Difference in useEffect and useState between click and tap?

Next.js 14.1.3
React 18.2.0
TailwindCSS 3.4.1
TailwindCSS-Merge 2.3.0
Node.js 20.16.0
Chrome 126.0.6478.185

Here is a video showing the differences in behavior in PC and mobile device emulators:
https://imgur.com/a/We924KI

On a PC, you can click again where it turned green and it will immediately turn white (actually, you have to remove the mouseover, though…).
On the mobile emulator, however, it remained green after another click and did not turn white until I clicked outside the element. How can this be resolved?

"use client";

import { useState, useEffect } from "react";

import { cn } from "@/app/lib/utils";

const gray_300 = "#d1d5db";
const emerald_300 = "#6ee7b7";

type SeatStatusType = "disabled" | "available" | "selected";

export default function Page() {
    // prettier-ignore
    const [availableSeats, setAvailableSeats] = useState<string[]>([
        "A1",
    ]);
    const [selectedSeats, setSelectedSeats] = useState<string[]>([]);
    const addSelectedSeat = (v: string) => {
        setSelectedSeats([...selectedSeats, v]);
    };
    const removeSelectedSeat = (v: string) => {
        setSelectedSeats(selectedSeats.filter((seat) => seat !== v));
    };

    return (
        <_TableGrid
            _id="A"
            addSelectedSeat={addSelectedSeat}
            removeSelectedSeat={removeSelectedSeat}
            availableSeats={availableSeats}
            selectedSeats={selectedSeats}
        />
    );
}

function _TableGrid({
    _id,
    addSelectedSeat,
    removeSelectedSeat,
    availableSeats,
    selectedSeats,
}: {
    _id: string;
    addSelectedSeat: (seat: string) => void;
    removeSelectedSeat: (seat: string) => void;
    availableSeats: Readonly<string[]>;
    selectedSeats: Readonly<string[]>;
}) {
    const [status1, setStatus1] = useState<SeatStatusType>("available");

    useEffect(() => {
        for (const seatNum of ["1"]) {
            const seat = _id + seatNum;
            if (!availableSeats.includes(seat)) {
                if (seatNum === "1") setStatus1("disabled");

                continue;
            } else if (selectedSeats.includes(seat)) {
                if (seatNum === "1") setStatus1("selected");

                continue;
            } else {
                if (seatNum === "1") setStatus1("available");
            }
        }
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [availableSeats, selectedSeats]);

    return (
        <div className="col-span-1 row-span-1 h-[60px] w-[45px]">
            <RightUpperTableGrid
                onClick={() => {
                    if (status1 === "disabled") return;
                    if (status1 === "available") {
                        // to disable
                        addSelectedSeat(_id + "1");
                    } else {
                        // to enable
                        removeSelectedSeat(_id + "1");
                    }
                    setStatus1(status1 === "available" ? "selected" : "available");
                }}
                color={status1 === "disabled" ? gray_300 : status1 === "selected" ? emerald_300 : ""}
            />
        </div>
    );
}

function TableSVGTag({
    children,
    border,
    onClick,
    color,
}: {
    children: React.ReactNode;
    border: number;
    onClick?: () => void;
    color?: string;
}) {
    return (
        <svg
            xmlns="http://www.w3.org/2000/svg"
            width={45 + border}
            height={60 + border}
            viewBox={cn(2, 2, 47, 62)}
            fill={color || "none"}
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
            className={cn(
                "lucide lucide-grid-2x2 m-0 block p-0 hover:cursor-pointer",
                color === gray_300 ? "hover:fill-gray-300" : "hover:fill-emerald-300"
            )}
            onClick={onClick}
        >
            {children}
        </svg>
    );
}

export function RightUpperTableGrid({ onClick, color }: { onClick: () => void; color: string }) {
    const width = 45;
    const height = 60;
    const radius = 5;
    return (
        <TableSVGTag onClick={onClick} color={color} border={2}>
            <path
                d={`M 3 3
                       L ${width + 3 - radius} 3
                       A ${radius} ${radius} 0 0 1 ${width + 3} ${3 + radius}
                       L ${width + 3} ${height + 3}
                       L 3 ${height + 3}
                       Z`}
            />
        </TableSVGTag>
    );
}

I want the element to be white on mobile without having to click outside of the element.
I am sure this is due to the fact that for some reason on mobile it is not re-rendering after a State update, but I don’t know how to force it.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật