Skip to content

Commit

Permalink
feat: update axios
Browse files Browse the repository at this point in the history
  • Loading branch information
akhmyrov committed Nov 25, 2022
1 parent 2ced7fe commit 1f5f2da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const esModules = ['react-icons', 'lodash-es'].join('|')
const esModules = ['react-icons', 'lodash-es', 'axios'].join('|')

module.exports = {
preset: 'ts-jest',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bestdoctor/ke-beta",
"version": "13.2.9",
"version": "13.3.0",
"description": "BestDoctor back-office UI constructor",
"author": "pro100filipp",
"main": "dist/index.js",
Expand Down Expand Up @@ -125,7 +125,7 @@
"@emotion/css": "^11.1.3",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"axios": "^0.26.0",
"axios": "^1.2.0",
"classnames": "^2.3.1",
"date-fns": "^2.16.1",
"effector": "^21.8.5",
Expand Down
4 changes: 2 additions & 2 deletions src/FormControls/FilesUpload/UploadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function UploadingList({ files }: UploadingListProps): ReactElement<UploadingLis
<ListItem key={file.key}>
<ListIcon as={Loader} />
{file.name}
<Progress hasStripe isAnimated value={Math.floor((file.loaded / file.total) * 100)} />
<Progress hasStripe isAnimated value={Math.floor((file.loaded / (file.total || file.loaded)) * 100)} />
</ListItem>
))}
</List>
Expand All @@ -145,4 +145,4 @@ interface UploadingListProps {
files: LoadingFileDescriptor[]
}

export type OnProgress = (event: { loaded: number; total: number }) => void
export type OnProgress = (event: { loaded: number; total?: number }) => void
2 changes: 1 addition & 1 deletion src/FormControls/FilesUpload/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export interface LoadingFileDescriptor {
key: string
name: string
loaded: number
total: number
total?: number
start: Date
}

0 comments on commit 1f5f2da

Please sign in to comment.