import React, {FC} from "react"; import {useAtom, useAtomValue} from "jotai"; import {selectedDiceAtom, thisPlayerAtom} from "../utils/state"; import {Button} from "./button"; export const AllDice: FC<{ values?: number[] } & ComponentProps> = ( { className, values, }) => { const [selectedDice, setSelectedDice] = useAtom(selectedDiceAtom); function handleClick(dice: SelectedDice): void { setSelectedDice(dice); } return (