Переглянути джерело

@uppy/dashboard: fix linter (#3206)

Antoine du Hamel 3 роки тому
батько
коміт
c33c4e43b2
1 змінених файлів з 19 додано та 21 видалено
  1. 19 21
      packages/@uppy/dashboard/src/components/FileList.js

+ 19 - 21
packages/@uppy/dashboard/src/components/FileList.js

@@ -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