|
|
@ -6,7 +6,7 @@ import {ConfigurationSettings} from '@remix-project/remix-lib' |
|
|
|
import {checkSpecialChars, CustomTooltip, extractNameFromKey} from '@remix-ui/helper' |
|
|
|
import {checkSpecialChars, CustomTooltip, extractNameFromKey} from '@remix-ui/helper' |
|
|
|
import {canUseWorker, urlFromVersion, pathToURL} from '@remix-project/remix-solidity' |
|
|
|
import {canUseWorker, urlFromVersion, pathToURL} from '@remix-project/remix-solidity' |
|
|
|
import {compilerReducer, compilerInitialState} from './reducers/compiler' |
|
|
|
import {compilerReducer, compilerInitialState} from './reducers/compiler' |
|
|
|
import {resetEditorMode, listenToEvents} from './actions/compiler' |
|
|
|
import {listenToEvents} from './actions/compiler' |
|
|
|
import {getValidLanguage} from '@remix-project/remix-solidity' |
|
|
|
import {getValidLanguage} from '@remix-project/remix-solidity' |
|
|
|
import {CopyToClipboard} from '@remix-ui/clipboard' |
|
|
|
import {CopyToClipboard} from '@remix-ui/clipboard' |
|
|
|
import {configFileContent} from './compilerConfiguration' |
|
|
|
import {configFileContent} from './compilerConfiguration' |
|
|
@ -231,16 +231,13 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
if (compilerContainer.editor.mode) { |
|
|
|
if (compilerContainer.editor.mode) { |
|
|
|
switch (compilerContainer.editor.mode) { |
|
|
|
if (compilerContainer.editor.mode.startsWith('sessionSwitched')) { |
|
|
|
case 'sessionSwitched': |
|
|
|
|
|
|
|
sessionSwitched() |
|
|
|
sessionSwitched() |
|
|
|
resetEditorMode()(dispatch) |
|
|
|
return |
|
|
|
break |
|
|
|
} else if (compilerContainer.editor.mode.startsWith('contentChanged')) { |
|
|
|
case 'contentChanged': |
|
|
|
|
|
|
|
contentChanged() |
|
|
|
contentChanged() |
|
|
|
resetEditorMode()(dispatch) |
|
|
|
return |
|
|
|
break |
|
|
|
}
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, [compilerContainer.editor.mode]) |
|
|
|
}, [compilerContainer.editor.mode]) |
|
|
|
|
|
|
|
|
|
|
|