Skip to content

Commit

Permalink
remove react and yo
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Dec 21, 2021
1 parent ff1be0e commit 92c1a4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/remix-ide/src/app/tabs/theme-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import QueryParams from '../../lib/query-params'
import * as packageJson from '../../../../../package.json'
import ReactDOM from 'react-dom'
// eslint-disable-next-line no-use-before-define
import React from 'react'
import yo from 'yo-yo'
const _paq = window._paq = window._paq || []

const themes = [
Expand Down Expand Up @@ -68,7 +64,11 @@ export class ThemeModule extends Plugin {
if (this.active) {
const nextTheme = this.themes[this.active] // Theme
document.documentElement.style.setProperty('--theme', nextTheme.quality)
const theme = yo`<link rel="stylesheet" href="${nextTheme.url}" id="theme-link"/>`

const theme = document.createElement('link')
theme.setAttribute('rel', 'stylesheet')
theme.setAttribute('href', nextTheme.url)
theme.setAttribute('id', 'theme-link')
theme.addEventListener('load', () => {
if (callback) callback()
})
Expand Down

0 comments on commit 92c1a4f

Please sign in to comment.