Skip to content

Commit

Permalink
Refactoring cells component naming variable
Browse files Browse the repository at this point in the history
  • Loading branch information
zourdyzou committed Jul 28, 2022
1 parent 52c8492 commit 19dbcc7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/grid/cell/cell.tsx
Original file line number Diff line number Diff line change
@@ -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<CellsType> = ({ mouseDown, children }) => {
export const CellComponent: FunctionComponent<CellComponentType> = ({ mouseDown, children }) => {
switch (children) {
case 0:
case CellState.empty:
return <EmptyFrame />;
case 10:
case CellState.hidden:
return <ClosedFrame mouseDown={mouseDown} />;
default:
return <ClosedFrame mouseDown={mouseDown} />;
Expand Down

0 comments on commit 19dbcc7

Please sign in to comment.