From 7f66c66e6d916d34d0dcf6e6dd4df7035694096f Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 13 Jul 2021 12:04:04 +0100 Subject: [PATCH] Fixed infinte spinner icon --- .../solidity-compiler/src/lib/compiler-container.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 4d189fee05..17c498522a 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -4,7 +4,7 @@ import { CompilerContainerProps, ConfigurationSettings } from './types' import * as helper from '../../../../../apps/remix-ide/src/lib/helper' import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from './logic/compiler-utils' // eslint-disable-line import { compilerReducer, compilerInitialState } from './reducers/compiler' -import { resetCompilerMode, resetEditorMode, listenToEvents } from './actions/compiler' +import { resetEditorMode, listenToEvents } from './actions/compiler' import './css/style.css' @@ -85,23 +85,18 @@ export const CompilerContainer = (props: CompilerContainerProps) => { switch (compilerContainer.compiler.mode) { case 'startingCompilation': startingCompilation() - resetCompilerMode()(dispatch) break case 'compilationDuration': - compilationDuration(compilerContainer.compiler.args) - resetCompilerMode()(dispatch) + compilationDuration(compilerContainer.compiler.args[0]) break case 'loadingCompiler': loadingCompiler() - resetCompilerMode()(dispatch) break case 'compilerLoaded': compilerLoaded() - resetCompilerMode()(dispatch) break case 'compilationFinished': compilationFinished() - resetCompilerMode()(dispatch) break } } @@ -239,7 +234,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { compileIcon.current.classList.add('remixui_spinningIcon') } - const compilationDuration = ({ speed }) => { + const compilationDuration = (speed: number) => { if (!warningIcon.current) return if (speed > 1000) { const msg = `Last compilation took ${speed}ms. We suggest to turn off autocompilation.`