fix lint warnings

This commit is contained in:
Roland Osborne 2023-08-11 15:15:29 -07:00
parent 0de1616f77
commit b2f1316259
3 changed files with 3 additions and 6 deletions

View File

@ -1,13 +1,11 @@
import React, { useState, useRef } from 'react';
import { Progress, Modal, Spin } from 'antd';
import React, { useState } from 'react';
import { Progress } from 'antd';
import ReactResizeDetector from 'react-resize-detector';
import { DownloadOutlined } from '@ant-design/icons';
import { BinaryAssetWrapper } from './BinaryAsset.styled';
import { useBinaryAsset } from './useBinaryAsset.hook';
import Colors from 'constants/Colors';
import background from 'images/audio.png';
export function BinaryAsset({ asset }) {
const [width, setWidth] = useState(0);

View File

@ -1,5 +1,4 @@
import styled from 'styled-components';
import Colors from 'constants/Colors';
export const BinaryAssetWrapper = styled.div`
position: relative;

View File

@ -25,7 +25,7 @@ export function useBinaryAsset(asset) {
const view = index.current;
updateState({ active: true, ready: false, error: false, loading: true, url: null });
const blob = await asset.getDecryptedBlob(() => view !== index.current, (block, total) => {
if (!updated.current || block == total) {
if (!updated.current || block === total) {
updated.current = true;
setTimeout(() => {
updated.current = false;