Private
Public Access
1
0

chg: dev: massive refactor on front-end - and remove unnecessary deps #4

This commit is contained in:
2026-04-10 17:57:26 +02:00
parent 086d6c601e
commit b57442bec1
22 changed files with 2619 additions and 1425 deletions

View File

@@ -0,0 +1,28 @@
/*
* This file is part of the SplendidBear Websites' projects.
*
* Copyright (c) 2026 @ www.splendidbear.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React from 'react';
import { useGame } from '../contexts/GameContext';
import useServerComm from '../hooks/useServerComm';
import GridControl from './grid/GridControl';
export const GameBoard = ({ gameAssoc, gameInherited, isEnvDev }) => {
const { gridReady } = useGame();
const { onClick, resign } = useServerComm(gameAssoc, gameInherited, isEnvDev);
if (!gridReady) {
return (
<div className="game-overlay">
<div className="game-overlay-window"><h1>Loading</h1></div>
</div>
);
}
return <GridControl onClick={onClick} resign={resign} />;
};