Merge pull request #1027 from ethereum/cleanup

cleanup redundant code and console logs
pull/5370/head
David Disu 4 years ago committed by GitHub
commit 410522369b
  1. 1
      apps/remix-ide/src/migrateFileSystem.js
  2. 30
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -15,7 +15,6 @@ export default (fileProvider) => {
fileProvider.set(path, content)
// TODO https://github.com/ethereum/remix-ide/issues/2377
// fileStorage.remove(path) we don't want to remove it as we are still supporting the old version
console.log('file migrated', path)
}
})
fileStorageBrowserFS.set(flag, 'done')

@ -299,12 +299,6 @@ export const Workspace = (props: WorkspaceProps) => {
)
}
// const handleWorkspaceSelect = (e) => {
// const value = e.target.value
// setWorkspace(value)
// }
return (
<div className='remixui_container'>
<ModalDialog
@ -358,15 +352,15 @@ export const Workspace = (props: WorkspaceProps) => {
title='Delete'>
</span>
</span>
<select id="workspacesSelect" data-id="workspacesSelect" onChange={(e) => setWorkspace(e.target.value)} className="form-control custom-select">
<select id="workspacesSelect" value={state.currentWorkspace} data-id="workspacesSelect" onChange={(e) => setWorkspace(e.target.value)} className="form-control custom-select">
{
state.workspaces
.map((folder) => {
return <option selected={state.currentWorkspace === folder} value={folder}>{folder}</option>
.map((folder, index) => {
return <option key={index} value={folder}>{folder}</option>
})
}
<option selected={state.currentWorkspace === LOCALHOST} value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option>
{ state.workspaces.length <= 0 && <option selected={state.currentWorkspace === NO_WORKSPACE} value={NO_WORKSPACE}>{NO_WORKSPACE}</option> }
<option value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option>
{ state.workspaces.length <= 0 && <option value={NO_WORKSPACE}>{NO_WORKSPACE}</option> }
</select>
</div>
</header>
@ -404,20 +398,6 @@ export const Workspace = (props: WorkspaceProps) => {
}
</div>
}
<div className='pl-2 remixui_treeview'>
{ false && <FileExplorer
name='browser'
registry={props.registry}
filesProvider={props.browser}
menuItems={['createNewFile', 'createNewFolder', 'publishToGist', canUpload ? 'uploadFile' : '']}
plugin={props.plugin}
focusRoot={state.reset}
contextMenuItems={props.registeredMenuItems}
displayInput={state.displayNewFile}
externalUploads={state.uploadFileEvent}
/>
}
</div>
</div>
</div>
</div>

Loading…
Cancel
Save