Преглед изворни кода

Revert "Fix i18n error in `CopyLinkButton`"

This reverts commit cc81561ec65ee500078b29739a087957602c11f6.
Murderlon пре 3 година
родитељ
комит
b34394ba56
1 измењених фајлова са 2 додато и 5 уклоњено
  1. 2 5
      packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js

+ 2 - 5
packages/@uppy/dashboard/src/components/FileItem/Buttons/index.js

@@ -63,14 +63,12 @@ const copyLinkToClipboard = (event, props) => {
 }
 }
 
 
 function CopyLinkButton (props) {
 function CopyLinkButton (props) {
-  const { i18n } = props
-
   return (
   return (
     <button
     <button
       className="uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink"
       className="uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink"
       type="button"
       type="button"
-      aria-label={i18n('copyLink')}
-      title={i18n('copyLink')}
+      aria-label={props.i18n('copyLink')}
+      title={props.i18n('copyLink')}
       onClick={(event) => copyLinkToClipboard(event, props)}
       onClick={(event) => copyLinkToClipboard(event, props)}
     >
     >
       <svg aria-hidden="true" focusable="false" className="uppy-c-icon" width="14" height="14" viewBox="0 0 14 12">
       <svg aria-hidden="true" focusable="false" className="uppy-c-icon" width="14" height="14" viewBox="0 0 14 12">
@@ -116,7 +114,6 @@ module.exports = function Buttons (props) {
         <CopyLinkButton
         <CopyLinkButton
           file={file}
           file={file}
           uppy={uppy}
           uppy={uppy}
-          i18n={i18n}
         />
         />
       ) : null}
       ) : null}
       {showRemoveButton ? (
       {showRemoveButton ? (