@uppy/status-bar: remove throttled component (#4396)

Co-authored-by: Murderlon <merlijn@soverin.net>
This commit is contained in:
Artur Paikin 2023-07-05 14:31:28 +01:00 committed by GitHub
parent d1697b0cb8
commit 7fcc7a6bbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 9 deletions

View file

@ -30,7 +30,6 @@
"@transloadit/prettier-bytes": "0.0.9",
"@uppy/utils": "workspace:^",
"classnames": "^2.2.6",
"lodash": "^4.17.21",
"preact": "^10.5.13"
},
"peerDependencies": {

View file

@ -1,6 +1,5 @@
import { h } from 'preact'
import classNames from 'classnames'
import throttle from 'lodash/throttle.js'
import prettierBytes from '@transloadit/prettier-bytes'
import prettyETA from '@uppy/utils/lib/prettyETA'
@ -283,11 +282,6 @@ function UploadNewlyAddedFiles (props) {
)
}
const ThrottledProgressDetails = throttle(ProgressDetails, 500, {
leading: true,
trailing: true,
})
function ProgressBarUploading (props) {
const {
i18n,
@ -305,6 +299,7 @@ function ProgressBarUploading (props) {
totalETA,
startUpload,
} = props
const showUploadNewlyAddedFiles = newFiles && isUploadStarted
if (!isUploadStarted || isAllComplete) {
@ -317,7 +312,7 @@ function ProgressBarUploading (props) {
if (!isAllPaused && !showUploadNewlyAddedFiles && showProgressDetails) {
if (supportsUploadProgress) {
return (
<ThrottledProgressDetails
<ProgressDetails
numUploads={numUploads}
complete={complete}
totalUploadedSize={totalUploadedSize}

View file

@ -10890,7 +10890,6 @@ __metadata:
"@transloadit/prettier-bytes": 0.0.9
"@uppy/utils": "workspace:^"
classnames: ^2.2.6
lodash: ^4.17.21
preact: ^10.5.13
peerDependencies:
"@uppy/core": "workspace:^"