Skip to content

Commit 6b2d612

Browse files
committed
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
1 parent 7e23cfe commit 6b2d612

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {PluginClient} from '@remixproject/plugin'
2+
import {createClient} from '@remixproject/plugin-webview'
3+
import EventManager from 'events'
4+
5+
export class ContractVerificationPluginClient extends PluginClient {
6+
public internalEvents: EventManager
7+
8+
constructor() {
9+
super()
10+
this.internalEvents = new EventManager()
11+
createClient(this)
12+
this.onload()
13+
}
14+
}

apps/contract-verification/src/app/app.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import React, {useState, useEffect, useRef} from 'react'
22

3+
import {ContractVerificationPluginClient} from './ContractVerificationPluginClient'
4+
35
import {AppContext} from './AppContext'
46
import DisplayRoutes from './routes'
5-
7+
import {CustomTooltip} from '@remix-ui/helper'
68
import {ThemeType} from './types'
79

810
import './App.css'
911

12+
const plugin = new ContractVerificationPluginClient()
13+
1014
const App = () => {
1115
const [themeType, setThemeType] = useState<ThemeType>('dark')
1216

0 commit comments

Comments
 (0)