Fix "key missing in list" errors (#885)

This commit is contained in:
infinite-persistence 2022-02-16 16:38:48 +08:00
commit 70c05972cc
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
2 changed files with 5 additions and 3 deletions

View file

@ -251,8 +251,8 @@ export default function ClaimList(props: Props) {
{sortedUris.map((uri, index) => {sortedUris.map((uri, index) =>
droppableProvided ? ( droppableProvided ? (
<React.Suspense fallback={null}> <React.Suspense fallback={null} key={uri}>
<Draggable key={uri} draggableId={uri} index={index}> <Draggable draggableId={uri} index={index}>
{(draggableProvided, draggableSnapshot) => { {(draggableProvided, draggableSnapshot) => {
// Restrict dragging to vertical axis // Restrict dragging to vertical axis
// https://github.com/atlassian/react-beautiful-dnd/issues/958#issuecomment-980548919 // https://github.com/atlassian/react-beautiful-dnd/issues/958#issuecomment-980548919

View file

@ -112,7 +112,9 @@ export default function Notification(props: Props) {
let uriIndicator; let uriIndicator;
const title = titleSplit.map((message, index) => { const title = titleSplit.map((message, index) => {
if (channelName === message) { if (channelName === message) {
uriIndicator = <UriIndicator uri={channelUrl} link channelInfo={{ uri: channelUrl, name: channelName }} />; uriIndicator = (
<UriIndicator key={channelUrl} uri={channelUrl} link channelInfo={{ uri: channelUrl, name: channelName }} />
);
fullTitle.push(' '); fullTitle.push(' ');
const resultTitle = fullTitle; const resultTitle = fullTitle;
fullTitle = [' ']; fullTitle = [' '];