Fix broken component descriptor
This commit is contained in:
parent
5ce44a8d93
commit
608ec9c72a
|
@ -9,13 +9,13 @@ const undoClass = "undo-game";
|
|||
/**
|
||||
* Gets a component which represents the specified {@link game `game`}.
|
||||
*
|
||||
* @param {import("./Game.js").Game} game
|
||||
* @param {{game: import("./Game.js").Game }} game
|
||||
* The game represented in this app.
|
||||
*
|
||||
* @returns {NodeDescriptor}
|
||||
* The rendered node.
|
||||
*/
|
||||
export function App(game)
|
||||
export function App({ game })
|
||||
{
|
||||
return [
|
||||
"div",
|
||||
|
@ -91,6 +91,7 @@ export function App(game)
|
|||
*/
|
||||
export function Board({ board })
|
||||
{
|
||||
console.log(board);
|
||||
let fields = board.flatMap((row) => row);
|
||||
|
||||
return [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { App } from "./Components.js";
|
||||
import { State } from "./State.js";
|
||||
import { SuiWeb } from "./SuiWeb.js";
|
||||
import { render } from "./SuiWeb.js";
|
||||
|
||||
/**
|
||||
* Represents a game.
|
||||
|
@ -192,7 +192,7 @@ export class Game
|
|||
{
|
||||
let container = document.getElementById(this.id);
|
||||
container.innerHTML = "";
|
||||
SuiWeb.render([App, this], container);
|
||||
render([App, { game: this }], container);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue