use outpoint as key in FileList #1724

Merged
neb-b merged 1 commit from 1327 into master 2018-07-02 20:45:27 +02:00
2 changed files with 8 additions and 3 deletions

View file

@ -152,7 +152,12 @@ class FileList extends React.PureComponent<Props, State> {
}
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
const { name: claimName, claim_name: claimNameDownloaded, claim_id: claimId } = fileInfo;
const {
name: claimName,
claim_name: claimNameDownloaded,
claim_id: claimId,
outpoint,
} = fileInfo;
const uriParams = {};
// This is unfortunate
@ -162,7 +167,8 @@ class FileList extends React.PureComponent<Props, State> {
uriParams.claimId = claimId;
const uri = buildURI(uriParams);
content.push(<FileCard key={uri} uri={uri} checkPending={checkPending} />);
// See https://github.com/lbryio/lbry-app/issues/1327 for discussion around using outpoint as the key
content.push(<FileCard key={outpoint} uri={uri} checkPending={checkPending} />);
});
return (

View file

@ -1,6 +1,5 @@
import React from 'react';
import Button from 'component/button';
import { FileTile } from 'component/fileTile';
import FileList from 'component/fileList';
import Page from 'component/page';