mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
fix lint warnings
This commit is contained in:
parent
0de1616f77
commit
b2f1316259
@ -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);
|
||||
|
@ -1,5 +1,4 @@
|
||||
import styled from 'styled-components';
|
||||
import Colors from 'constants/Colors';
|
||||
|
||||
export const BinaryAssetWrapper = styled.div`
|
||||
position: relative;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user