Set keys on list elements

This commit is contained in:
2026-04-12 01:30:18 -04:00
parent 4b15c65092
commit 1f2a8770a1
2 changed files with 5 additions and 1 deletions

View File

@@ -268,6 +268,7 @@ export default function () {
element: ( element: (
<AppealCard <AppealCard
{...(entry as AppealCardProps & { port?: MessagePort })} {...(entry as AppealCardProps & { port?: MessagePort })}
key={`appeal_${entry.id}`}
port={messageChannel.current?.port2} port={messageChannel.current?.port2}
/> />
), ),
@@ -281,6 +282,7 @@ export default function () {
element: ( element: (
<GameAppealCard <GameAppealCard
{...(entry as GameAppealProps & { port?: MessagePort })} {...(entry as GameAppealProps & { port?: MessagePort })}
key={`gma_${entry.id}`}
port={messageChannel.current?.port2} port={messageChannel.current?.port2}
/> />
), ),
@@ -294,6 +296,7 @@ export default function () {
element: ( element: (
<InactivityNoticeCard <InactivityNoticeCard
{...(entry as InactivityNoticeProps & { port?: MessagePort })} {...(entry as InactivityNoticeProps & { port?: MessagePort })}
key={`inactivity_${entry.id}`}
port={messageChannel.current?.port2} port={messageChannel.current?.port2}
/> />
), ),
@@ -307,6 +310,7 @@ export default function () {
element: ( element: (
<ReportCard <ReportCard
{...(entry as ReportCardProps & { port?: MessagePort })} {...(entry as ReportCardProps & { port?: MessagePort })}
key={`report_${entry.id}`}
port={messageChannel.current?.port2} port={messageChannel.current?.port2}
/> />
), ),

View File

@@ -91,7 +91,7 @@ export default function (props: { isOpen: boolean; onClose: () => void }) {
</Thead> </Thead>
<Tbody> <Tbody>
{entries.map((entry) => ( {entries.map((entry) => (
<Tr> <Tr key={`appealban_${entry.user}`}>
<Td>{entry.user}</Td> <Td>{entry.user}</Td>
<Td>{entry.created_by}</Td> <Td>{entry.created_by}</Td>
<Td>{new Date(entry.created_at).toUTCString()}</Td> <Td>{new Date(entry.created_at).toUTCString()}</Td>