chg: dev: massive refactor on front-end for unification and readiness #8
This commit is contained in:
@@ -13,6 +13,7 @@ import GridField from './GridField';
|
||||
import UserControl from '../user/UserControl';
|
||||
import GameTimer from '../GameTimer';
|
||||
import { BOMB_SYMBOLS, bombRadius } from '@mine-utils';
|
||||
import { func, string } from 'prop-types';
|
||||
|
||||
const GridControl = ({ gameAssoc, onClick, resign }) => {
|
||||
const {
|
||||
@@ -61,10 +62,11 @@ const GridControl = ({ gameAssoc, onClick, resign }) => {
|
||||
<div className={`game-overlay${overlay ? '' : ' hide'}`}>
|
||||
<div className="game-overlay-window">
|
||||
<h1>{overlayTitle}</h1>
|
||||
{'string' === typeof overlaySubTitle ? (
|
||||
{'string' === typeof overlaySubTitle && (
|
||||
<h2>{overlaySubTitle}</h2>
|
||||
) : (
|
||||
overlaySubTitle
|
||||
)}
|
||||
{'string' !== typeof overlaySubTitle && (
|
||||
<Fragment>{overlaySubTitle}</Fragment>
|
||||
)}
|
||||
{gameAssoc && endRef.current && (
|
||||
<div className="game-overlay-actions">
|
||||
@@ -113,3 +115,9 @@ const GridControl = ({ gameAssoc, onClick, resign }) => {
|
||||
};
|
||||
|
||||
export default GridControl;
|
||||
|
||||
GridControl.propTypes = {
|
||||
gameAssoc: string,
|
||||
onClick: func.isRequired,
|
||||
resign: func.isRequired,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user