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) =>
droppableProvided ? (
<React.Suspense fallback={null}>
<Draggable key={uri} draggableId={uri} index={index}>
<React.Suspense fallback={null} key={uri}>
<Draggable draggableId={uri} index={index}>
{(draggableProvided, draggableSnapshot) => {
// Restrict dragging to vertical axis
// 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;
const title = titleSplit.map((message, index) => {
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(' ');
const resultTitle = fullTitle;
fullTitle = [' '];