diff --git a/apps/remixdocgen/src/app/App.tsx b/apps/remixdocgen/src/app/App.tsx index 0e88d4ba32..f321678573 100644 --- a/apps/remixdocgen/src/app/App.tsx +++ b/apps/remixdocgen/src/app/App.tsx @@ -21,7 +21,6 @@ export const getNewContractNames = (compilationResult: CompilationResult) => { } const App = () => { - const [themeType, setThemeType] = useState('dark'); const [hasBuild, setHasBuild] = useState(false); const [fileName, setFileName] = useState(''); @@ -39,12 +38,9 @@ const App = () => { client.eventEmitter.on('docsGenerated', (docs: string[]) => { console.log('docsGenerated', docs) }) - - - }; - - watchThemeSwitch(); - }, []); + } + watchThemeSwitch() + }, []) return (
diff --git a/apps/remixdocgen/src/app/docgen-client.ts b/apps/remixdocgen/src/app/docgen-client.ts index 721bb433b2..8570c5d0b5 100644 --- a/apps/remixdocgen/src/app/docgen-client.ts +++ b/apps/remixdocgen/src/app/docgen-client.ts @@ -16,9 +16,8 @@ export class DocGenClient extends PluginClient { constructor() { super() this.eventEmitter = new EventEmitter() + this.methods = ['generateDocs', 'viewDocs'] createClient(this) - // this.docgen = new DocGen() - this.methods = ['generateDocs', 'publishDocs', 'viewDocs'] this.onload().then(async () => { console.log('docgen client loaded') await this.setListeners() @@ -28,7 +27,7 @@ export class DocGenClient extends PluginClient { async setListeners() { this.currentTheme = await this.call('theme', 'currentTheme') - this.on("theme", "themeChanged", (theme: any) => { + this.on('theme', 'themeChanged', (theme: any) => { this.currentTheme = theme this.eventEmitter.emit('themeChanged', this.currentTheme) });