diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index 0854f7586e..f81decf27b 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -9,6 +9,7 @@ const vm = require('vm') const EventManager = require('../../lib/events') import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line +import { ViewPluginUI } from '../components/ViewPluginUI' const KONSOLES = [] @@ -79,9 +80,12 @@ class Terminal extends Plugin { this.call('menuicons', 'select', 'debugger') this.call('debugger', 'debug', hash) }) + this.dispatch = null + } + - onActivation () { + onActivation() { this.renderComponent() } @@ -100,19 +104,28 @@ class Terminal extends Plugin { this.terminalApi.log(message) } + setDispatch(dispatch) { + this.dispatch = dispatch + } + render () { - return this.element + return
+ } + + updateComponent(state) { + console.log("render terminal") + return } renderComponent () { const onReady = (api) => { this.terminalApi = api } - ReactDOM.render( - , - this.element - ) + this.dispatch({ + plugin: this, + onReady: onReady + }) } scroll2bottom () { diff --git a/apps/remix-ide/src/index.tsx b/apps/remix-ide/src/index.tsx index fde108b852..a418ecbd49 100644 --- a/apps/remix-ide/src/index.tsx +++ b/apps/remix-ide/src/index.tsx @@ -33,9 +33,9 @@ import ('./app').then((AppComponent) => { const appComponent = new AppComponent.default() appComponent.run().then(() => { render( - + <> - , + , document.getElementById('root') ) })