Skip to content

Commit

Permalink
Fix ErrorLogs drawer repeated key issue
Browse files Browse the repository at this point in the history
  • Loading branch information
serjonya-trili committed Sep 12, 2023
1 parent 8744c9a commit cdba5d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/settings/ErrorLogsDrawerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import colors from "../../style/colors";
import { ErrorContext } from "../../utils/getErrorContext";
import { useAppSelector } from "../../utils/redux/hooks";
import { DrawerTopButtons } from "../home/DrawerTopButtons";
import { nanoid } from "@reduxjs/toolkit";

const ErrorLogsDrawerCard = () => {
const { isOpen, onClose: closeDrawer, onOpen } = useDisclosure();
Expand Down Expand Up @@ -62,8 +63,8 @@ const ErrorLogsDrawerBody = () => {
{/* TODO:Implement delete */}
{/* <IconAndTextBtn label="Clear All" icon={Trash} textFirst onClick={() => {}} /> */}
</Flex>
{errors.map((error, i) => (
<ErrorLogRow errorLog={error} key={error.timestamp} />
{errors.map(error => (
<ErrorLogRow errorLog={error} key={nanoid()} />
))}
</Flex>
);
Expand Down

0 comments on commit cdba5d7

Please sign in to comment.