Clean up UI code

This commit is contained in:
Joel Therrien 2023-09-15 20:37:40 -07:00
parent c1d7a2f774
commit e5b2e4139e
4 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import {
PlayerAndScore,
ScoreResult,
Tray, TurnAction, TurnAdvanceResult
} from "word_grid";
} from "../../pkg/word_grid";
import {
HighlightableLetterData,
LocationType,
@ -131,7 +131,7 @@ export function Game(props: {
});
useEffect(() => {
const newLetterData = props.wasm.get_board_letters() as LetterData[];
const newLetterData = props.wasm.get_board_letters() as HighlightableLetterData[];
// we need to go through and set 'highlight' field to either true or false
// it will always be false if the player that just went was the AI

View file

@ -1,6 +1,6 @@
import * as React from "react";
import {useState} from "react";
import {Difficulty, GameWasm} from 'word_grid';
import {Difficulty, GameWasm} from '../../pkg/word_grid';
import {Settings} from "./utils";
import {Game} from "./Game";

View file

@ -1,4 +1,4 @@
import init, {GameWasm} from '../node_modules/word_grid/word_grid.js';
import init, {GameWasm} from '../../pkg/word_grid.js';
import {Game} from "./Game";
import {createRoot} from "react-dom/client";
import * as React from "react";

View file

@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2023",
"target": "ES2022",
"jsx": "react-jsx",
"lib": [
"es2023",