cleanup redundant code and console

pull/1027/head
ioedeveloper 4 years ago
parent 3328087fd2
commit 4c5832e050
  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) fileProvider.set(path, content)
// TODO https://github.com/ethereum/remix-ide/issues/2377 // 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 // 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') fileStorageBrowserFS.set(flag, 'done')

@ -299,12 +299,6 @@ export const Workspace = (props: WorkspaceProps) => {
) )
} }
// const handleWorkspaceSelect = (e) => {
// const value = e.target.value
// setWorkspace(value)
// }
return ( return (
<div className='remixui_container'> <div className='remixui_container'>
<ModalDialog <ModalDialog
@ -358,15 +352,15 @@ export const Workspace = (props: WorkspaceProps) => {
title='Delete'> title='Delete'>
</span> </span>
</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 state.workspaces
.map((folder) => { .map((folder, index) => {
return <option selected={state.currentWorkspace === folder} value={folder}>{folder}</option> return <option key={index} value={folder}>{folder}</option>
}) })
} }
<option selected={state.currentWorkspace === LOCALHOST} value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option> <option value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option>
{ state.workspaces.length <= 0 && <option selected={state.currentWorkspace === NO_WORKSPACE} value={NO_WORKSPACE}>{NO_WORKSPACE}</option> } { state.workspaces.length <= 0 && <option value={NO_WORKSPACE}>{NO_WORKSPACE}</option> }
</select> </select>
</div> </div>
</header> </header>
@ -404,20 +398,6 @@ export const Workspace = (props: WorkspaceProps) => {
} }
</div> </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> </div>
</div> </div>

Loading…
Cancel
Save