Skip to content

Commit

Permalink
fix: wrong key location
Browse files Browse the repository at this point in the history
  • Loading branch information
Compositr committed Jan 12, 2024
1 parent 5df00d8 commit c480d2f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/tables/TableWithHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode } from "react";
import { Fragment, ReactNode } from "react";

export default function TableWithHeader({
header,
Expand All @@ -24,9 +24,8 @@ export default function TableWithHeader({
</div>
<div className="flex flex-col p-2 divide-muted bg-white/5 rounded-md">
{content.map((row, i) => (
<>
<Fragment key={i}>
<div
key={i.toString()}
className="grid gap-2 divide-x-4 py-2 divide-muted rounded-md hover:bg-white/5"
style={{
gridTemplateColumns: `repeat(${header.length}, minmax(0, 1fr))`,
Expand All @@ -39,7 +38,7 @@ export default function TableWithHeader({
))}
</div>
<span className="w-full h-1 bg-muted rounded-full my-1 last:hidden"></span>
</>
</Fragment>
))}
</div>
</div>
Expand Down

0 comments on commit c480d2f

Please sign in to comment.