Skip to content

Commit

Permalink
@uppy/dashboard: fix linter (#3206)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Sep 20, 2021
1 parent 2b84c6e commit c33c4e4
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions packages/@uppy/dashboard/src/components/FileList.js
Expand Up @@ -68,27 +68,25 @@ module.exports = (props) => {
if (props.recoveredState) files.sort(sortByGhostComesFirst)
const rows = chunks(files, props.itemsPerRow)

function renderRow (row) {
return (
// The `role="presentation` attribute ensures that the list items are properly
// associated with the `VirtualList` element.
// We use the first file ID as the key—this should not change across scroll rerenders
<div role="presentation" key={row[0]}>
{row.map((fileID) => (
<FileItem
key={fileID}
uppy={props.uppy}
{...fileProps}
role="listitem"
openFileEditor={props.openFileEditor}
canEditFile={props.canEditFile}
toggleAddFilesPanel={props.toggleAddFilesPanel}
file={props.files[fileID]}
/>
))}
</div>
)
}
const renderRow = (row) => (
// The `role="presentation` attribute ensures that the list items are properly
// associated with the `VirtualList` element.
// We use the first file ID as the key—this should not change across scroll rerenders
<div role="presentation" key={row[0]}>
{row.map((fileID) => (
<FileItem
key={fileID}
uppy={props.uppy}
{...fileProps}
role="listitem"
openFileEditor={props.openFileEditor}
canEditFile={props.canEditFile}
toggleAddFilesPanel={props.toggleAddFilesPanel}
file={props.files[fileID]}
/>
))}
</div>
)

return (
<VirtualList
Expand Down

0 comments on commit c33c4e4

Please sign in to comment.