chg: dev: more, massive refactor for front-end #4
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
|
||||
import React from 'react';
|
||||
import { useGame } from '../contexts/GameContext';
|
||||
import useServerComm from '../hooks/useServerComm';
|
||||
import useServerCommunication from '../hooks/useServerCommunication';
|
||||
import GridControl from './grid/GridControl';
|
||||
|
||||
export const GameBoard = ({ gameAssoc, gameInherited, isEnvDev }) => {
|
||||
const { gridReady } = useGame();
|
||||
const { onClick, resign } = useServerComm(gameAssoc, gameInherited, isEnvDev);
|
||||
const { onClick, resign } = useServerCommunication(gameAssoc, gameInherited, isEnvDev);
|
||||
|
||||
if (!gridReady) {
|
||||
return (
|
||||
@@ -24,5 +24,10 @@ export const GameBoard = ({ gameAssoc, gameInherited, isEnvDev }) => {
|
||||
);
|
||||
}
|
||||
|
||||
return <GridControl onClick={onClick} resign={resign} />;
|
||||
return (
|
||||
<GridControl
|
||||
onClick={onClick}
|
||||
resign={resign}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user