Files
excel-download/react_webgame/main/Tr.jsx
2021-03-22 21:53:39 +09:00

18 lines
396 B
JavaScript

import React, { useContext } from "react";
import { TableContext } from "./MineSearch";
import Td from "./Td";
const Tr = ({ rowIndex }) => {
const { tableData } = useContext(TableContext);
return (
<tr>
{tableData[0] &&
Array(tableData[0].length)
.fill()
.map((td, i) => <Td rowIndex={rowIndex} cellIndex={i} />)}
</tr>
);
};
export default Tr;