lots of necessary plumbing
This commit is contained in:
@@ -1,22 +1,10 @@
|
||||
import {
|
||||
Accessor,
|
||||
createContext,
|
||||
createEffect,
|
||||
createSignal,
|
||||
For,
|
||||
onCleanup,
|
||||
Show,
|
||||
} from "solid-js";
|
||||
import { SimplePlayerView } from "../../../server/src/games/simple";
|
||||
import api, { fromWebsocket } from "../api";
|
||||
import { me, playerColor, profile } from "../profile";
|
||||
import { fromEvents, Stream, stream } from "kefir";
|
||||
import Bus from "kefir-bus";
|
||||
import { createObservable, createObservableWithInit, cx, WSEvent } from "../fn";
|
||||
import { EdenWS } from "@elysiajs/eden/treaty";
|
||||
import { Accessor, createContext, For, onCleanup, Show } from "solid-js";
|
||||
import { TWsIn, TWsOut } from "../../../server/src/table";
|
||||
import Player from "./Player";
|
||||
import api, { fromWebsocket } from "../api";
|
||||
import { createObservable, createObservableWithInit, cx } from "../fn";
|
||||
import { me } from "../profile";
|
||||
import Game from "./Game";
|
||||
import Player from "./Player";
|
||||
|
||||
export const TableContext = createContext<{
|
||||
players: Accessor<string[]>;
|
||||
@@ -95,10 +83,10 @@ export default (props: { tableKey: string }) => {
|
||||
<Show when={view() == null}>
|
||||
<div class="absolute center">
|
||||
<button
|
||||
onClick={() => ws.send({ startGame: true })}
|
||||
onClick={() => ws.send({ ready: true })}
|
||||
class="button p-1 "
|
||||
>
|
||||
Start Game!
|
||||
Ready
|
||||
</button>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
Reference in New Issue
Block a user