Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
balzack committed Aug 11, 2023
1 parent 0de1616 commit b2f1316
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from 'styled-components';
import Colors from 'constants/Colors';

export const BinaryAssetWrapper = styled.div`
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2f1316

Please sign in to comment.