Add pluginClient to fix unstyled Plugin

Only after adding the PluginClient (that imports @remixproject/plugin-webview) the
contract-verification-plugin started to inherit Remix styles
pull/5285/head
Kaan Uzdoğan 8 months ago committed by Aniket
parent 19cec7dbb3
commit 5219882321
  1. 14
      apps/contract-verification/src/app/ContractVerificationPluginClient.ts
  2. 6
      apps/contract-verification/src/app/app.tsx

@ -0,0 +1,14 @@
import {PluginClient} from '@remixproject/plugin'
import {createClient} from '@remixproject/plugin-webview'
import EventManager from 'events'
export class ContractVerificationPluginClient extends PluginClient {
public internalEvents: EventManager
constructor() {
super()
this.internalEvents = new EventManager()
createClient(this)
this.onload()
}
}

@ -1,12 +1,16 @@
import React, {useState, useEffect, useRef} from 'react'
import {ContractVerificationPluginClient} from './ContractVerificationPluginClient'
import {AppContext} from './AppContext'
import DisplayRoutes from './routes'
import {CustomTooltip} from '@remix-ui/helper'
import {ThemeType} from './types'
import './App.css'
const plugin = new ContractVerificationPluginClient()
const App = () => {
const [themeType, setThemeType] = useState<ThemeType>('dark')

Loading…
Cancel
Save