diff --git a/ui/src/Game.tsx b/ui/src/Game.tsx
index c2bd6f0..28874d4 100644
--- a/ui/src/Game.tsx
+++ b/ui/src/Game.tsx
@@ -107,7 +107,6 @@ export function Game(props: {
function addWordFn(word: string) {
props.wasm.add_word(word);
- logDispatch(
{word} was added to dictionary.
);
}
const [playerLetters, trayDispatch] = useReducer(movePlayableLetters, []);
@@ -359,7 +358,7 @@ export function Game(props: {
if (message.endsWith("is not a valid word")) {
// extract out word
const word = message.split(" ")[0];
- logDispatch(
{message}
);
+ logDispatch();
} else {
logDispatch(
{message}
);
}
@@ -410,12 +409,24 @@ export function Game(props: {
function AddWordButton(props: {word: string, addWordFn: (x: string) => void}) {
const [isClicked, setIsClicked] = useState(false);
- return
-}
\ No newline at end of file
+ if (!isClicked) {
+ return