Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const UploadProgress = ({ uploadTask, storageRef }) => {
const { bytesTransferred, totalBytes } = useStorageTask(
uploadTask,
storageRef
);
const percentComplete =
Math.round(100 * (bytesTransferred / totalBytes)) + '%';
return <span>{percentComplete}</span>;
};