chg: dev: massive refactor on front-end for unification and readiness #8
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
import React, { memo, useMemo } from 'react';
|
||||
import { IMAGES } from '@mine-utils';
|
||||
import { func, shape, bool, number, string } from 'prop-types';
|
||||
|
||||
const bombSrc = area => {
|
||||
if (null === area) return null;
|
||||
@@ -75,3 +76,16 @@ const GridField = memo(function GridField({ cell, onClick, onMouseEnter }) {
|
||||
});
|
||||
|
||||
export default GridField;
|
||||
|
||||
GridField.propTypes = {
|
||||
cell: shape({
|
||||
currentImage: string,
|
||||
currentObj: string,
|
||||
active: bool,
|
||||
lastClickedRed: bool,
|
||||
lastClickedBlue: bool,
|
||||
bombTargetArea: number,
|
||||
}).isRequired,
|
||||
onClick: func.isRequired,
|
||||
onMouseEnter: func.isRequired,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user