diff --git a/ui/src/elements.tsx b/ui/src/elements.tsx index 54be1c2..8405994 100644 --- a/ui/src/elements.tsx +++ b/ui/src/elements.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import {GameWasm, Letter as LetterData, Tray} from "word_grid"; import {createRoot} from "react-dom/client"; -import {useReducer, useState} from "react"; +import {Children, useReducer, useState} from "react"; export enum LocationType { GRID, @@ -29,6 +29,8 @@ function matchCoordinate(playerLetters: PlayableLetterData[], coords: Coordinate } +type TileDispatch = React.Dispatch<{start: CoordinateData, end: CoordinateData}>; + function movePlayableLetters(playerLetters: PlayableLetterData[], update: {start: CoordinateData, end: CoordinateData}) { let startIndex = matchCoordinate(playerLetters, update.start); @@ -66,7 +68,7 @@ export function Game(props: {wasm: GameWasm}) { return <> - +