From 4d749340a2eece22606ee4c3b3b33adbe1e6069f Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 3 Jul 2024 13:25:47 +0530 Subject: [PATCH] fix: lint error - semantic ambiguity --- frontend/package-lock.json | 4 +++- frontend/package.json | 1 + frontend/src/upload/Upload.tsx | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 295713e6..83e0a930 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,6 +11,7 @@ "@reduxjs/toolkit": "^1.9.2", "@vercel/analytics": "^0.1.10", "i18next": "^23.11.5", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.2.0", @@ -1488,7 +1489,7 @@ "version": "18.0.10", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.10.tgz", "integrity": "sha512-E42GW/JA4Qv15wQdqJq8DL4JhNpB3prJgjgapN3qJT9K2zO5IIAQh4VXvCEDupoqAwnz0cY4RlXeC/ajX5SFHg==", - "devOptional": true, + "dev": true, "dependencies": { "@types/react": "*" } @@ -6606,6 +6607,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", diff --git a/frontend/package.json b/frontend/package.json index ebcbb3fe..5f7a11d8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,6 +22,7 @@ "@reduxjs/toolkit": "^1.9.2", "@vercel/analytics": "^0.1.10", "i18next": "^23.11.5", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.2.0", diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 0360e2e5..2a1b51a9 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -55,7 +55,7 @@ function Upload({ } }, []); - function ProgressBar({ progress }: { progress: number }) { + function ProgressBar({ progressPercent }: { progressPercent: number }) { return (
- {progress >= 5 && `${progress}%`} + {progressPercent >= 5 && `${progressPercent}%`}
@@ -93,7 +93,7 @@ function Upload({ {/*

{progress?.percentage || 0}%

*/} {/* progress bar */} - +