Skip to content

Commit

Permalink
💬 remove unnecessary index for each round
Browse files Browse the repository at this point in the history
  • Loading branch information
dxanh97 committed Dec 18, 2024
1 parent d430cfd commit 49278e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/RoundsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ function RoundsList(props: Props) {
<ScrollArea ref={ref}>
{rounds.length === 0 && <Empty subTitle="Chưa có ván nào" />}

{rounds.map((round, i) => {
{rounds.map((round) => {
const { id, stats, timestamp } = round;
return (
<Box key={id} mt="md">
<Card shadow="sm" p="xs" pt="xs" pb={0} radius="md" withBorder>
<Group justify="space-between">
<Text fw={800}>
{`#${rounds.length - i} - ${formatDate(timestamp)}`}
</Text>
<Text fw={800}>{formatDate(timestamp)}</Text>
<Group gap="xs">
<EditRoundButton
roundId={round.id}
Expand Down

0 comments on commit 49278e3

Please sign in to comment.