ClaimList: fix "missing key in list" error

Each list item must have a unique key, and I didn't realize it needs to happen at the `<React.Suspence>` level too.
This commit is contained in:
infinite-persistence 2022-02-16 15:51:31 +08:00
parent b56dc66f23
commit d4f26c4272
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

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