Move top-level functions

pull/5370/head
ioedeveloper 3 years ago
parent e8e238744c
commit fd2e2a34b4
  1. 14
      apps/remix-ide/src/app/panels/file-panel.js
  2. 15
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -300,5 +300,19 @@ module.exports = class Filepanel extends ViewPlugin {
workspaceCreated (workspace) {
this.emit('createWorkspace', workspace)
}
resetFocus (reset) {
// setState(prevState => {
// return { ...prevState, reset }
// })
}
resetNewFile () {
// setState(prevState => {
// return { ...prevState, displayNewFile: !state.displayNewFile }
// })
}
resetUploadFile = () => {}
/** end section */
}

@ -53,21 +53,6 @@ export const Workspace = (props: WorkspaceProps) => {
const LOCALHOST = ' - connect to localhost - '
const NO_WORKSPACE = ' - none - '
/* extends the parent 'plugin' with some function needed by the file explorer */
props.plugin.resetFocus = (reset) => {
setState(prevState => {
return { ...prevState, reset }
})
}
props.plugin.resetNewFile = () => {
setState(prevState => {
return { ...prevState, displayNewFile: !state.displayNewFile }
})
}
props.plugin.resetUploadFile = () => {}
/* implement an external API, consumed by the parent */
props.request.createWorkspace = () => {
return createWorkspace()

Loading…
Cancel
Save