remove uneeded use of Theme React component

pull/5370/head
yann300 3 years ago
parent 25fb7979b9
commit b4af25e573
  1. 20
      apps/remix-ide/src/app/tabs/theme-module.js

@ -2,7 +2,6 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import QueryParams from '../../lib/query-params'
import * as packageJson from '../../../../../package.json'
import { RemixUiThemeModule } from '@remix-ui/theme-module'
import ReactDOM from 'react-dom'
// eslint-disable-next-line no-use-before-define
import React from 'react'
@ -37,8 +36,6 @@ export class ThemeModule extends Plugin {
this._deps = {
config: registry.get('config').api
}
this.element = document.createElement('div')
this.element.setAttribute('id', 'themeModuleSection')
this.themes = themes.reduce((acc, theme) => {
theme.url = window.location.origin + window.location.pathname + theme.url
return { ...acc, [theme.name]: theme }
@ -53,23 +50,6 @@ export class ThemeModule extends Plugin {
this.forced = !!queryTheme
}
onActivation () {
this.renderComponent()
}
render () {
return this.element
}
renderComponent () {
ReactDOM.render(
<RemixUiThemeModule
themeModule={this}
/>,
this.element
)
}
/** Return the active theme */
currentTheme () {
return this.themes[this.active]

Loading…
Cancel
Save