From 19dbcc77ea98ab21db5d2fc00b4d74c4650e04df Mon Sep 17 00:00:00 2001 From: Muhammad Zourdy Date: Thu, 28 Jul 2022 09:57:32 +0200 Subject: [PATCH] Refactoring cells component naming variable --- src/components/grid/cell/cell.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/grid/cell/cell.tsx b/src/components/grid/cell/cell.tsx index 5ce93198..5ad80fea 100644 --- a/src/components/grid/cell/cell.tsx +++ b/src/components/grid/cell/cell.tsx @@ -1,19 +1,19 @@ -import { Cell as CellType } from "@helpers/field"; +import { CellState, Cell as CellType } from "@helpers/field"; import classNames from "classnames"; import React, { FunctionComponent } from "react"; import styles from "./cell.module.scss"; -interface CellsType { +interface CellComponentType { mouseDown: boolean; children: CellType; } -export const CellComponent: FunctionComponent = ({ mouseDown, children }) => { +export const CellComponent: FunctionComponent = ({ mouseDown, children }) => { switch (children) { - case 0: + case CellState.empty: return ; - case 10: + case CellState.hidden: return ; default: return ;