Skip to content

Commit

Permalink
fix(table): key should not be a prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Oct 30, 2023
1 parent fcf910b commit 879a263
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/table.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import figureSet from "figures";
import { Box, BoxProps, Text, TextProps } from "ink";
import { Key, ReactNode } from "react";
import { ReactNode } from "react";
import colors from "../utils/colors.js";

function unique<T>(array: T[])
Expand Down Expand Up @@ -66,8 +66,8 @@ export function Table({ data, distribution, color, ...props }: { data: any[], di
return rtn;
};

const Cell = ({ key, index, children }: {key: Key, index: number, children: ReactNode}) =>
<Box key={key} marginX={1} {...cell_style(index)} width={width(index)}>
const Cell = ({ index, children }: { index: number, children: ReactNode}) =>
<Box marginX={1} {...cell_style(index)} width={width(index)}>
{children}
</Box>;

Expand Down

0 comments on commit 879a263

Please sign in to comment.