diff --git a/package.json b/package.json index c48fd96..3df9c74 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "devDependencies": { "react-scripts": "1.0.0" }, - "name": "ljg0t8", - "description": null, + "name": "a-maze-r", + "description": "The A-Maze-Ing Generator!", "version": "0.0.0", "scripts": { "start": "react-scripts start", diff --git a/src/App.js b/src/App.js index c7b5cf3..ad98c54 100644 --- a/src/App.js +++ b/src/App.js @@ -6,7 +6,7 @@ export default function App() { const [maze, setMaze] = useState({}); let title; if (!!maze.grid) { - title =

The Maze ({maze.width}x{maze.height})

; + title =

The Maze ({maze.width}x{maze.height}, ID: {maze.id})

; } else { title = ; } diff --git a/src/InputForm.js b/src/InputForm.js index 3c8af4a..cf84258 100644 --- a/src/InputForm.js +++ b/src/InputForm.js @@ -20,7 +20,6 @@ export default function InputForm({handleResult}) { .then(response => response.json()) .then(result => { handleResult(result); - // FIXME doesn't update the contents of the text input field. setId(_ => result.id); }) .catch(reason => { @@ -75,7 +74,7 @@ export default function InputForm({handleResult}) {


{ return {valid: true, value}; @@ -13,7 +13,6 @@ export default function ValidatingInputNumberField({ } }) { const [error, setError] = useState(null); - const [value, setValue] = useState(defaultValue); const handleValueChange = (e) => { const value = e.target.value; @@ -22,9 +21,8 @@ export default function ValidatingInputNumberField({ setError(validation.message); } else { setError(null); - onChange(validation.value); } - setValue(validation.value); + onChange(validation.value); }; let errorComponent; if (!!error) {