From 0741af18d58480a9c0af0bd2b2834e00428d0b99 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 14 Mar 2023 02:18:26 +0100 Subject: [PATCH] remove redundancies --- apps/docviewer/src/app/App.tsx | 1 - apps/docviewer/src/app/docviewer.ts | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/apps/docviewer/src/app/App.tsx b/apps/docviewer/src/app/App.tsx index 2c7785d4dc..37e3ca2256 100644 --- a/apps/docviewer/src/app/App.tsx +++ b/apps/docviewer/src/app/App.tsx @@ -7,7 +7,6 @@ export default function App() { const [contents, setContents] = useState('') useEffect(() => { client.eventEmitter.on('contentsReady', (fileContents: string) => { - console.log('contentsReady', fileContents) setContents(fileContents) }) diff --git a/apps/docviewer/src/app/docviewer.ts b/apps/docviewer/src/app/docviewer.ts index 0a78fd3a54..d6fed6e490 100644 --- a/apps/docviewer/src/app/docviewer.ts +++ b/apps/docviewer/src/app/docviewer.ts @@ -4,7 +4,6 @@ import EventEmitter from 'events' export class DocViewer extends PluginClient { mdFile: string - fileContents: string eventEmitter: EventEmitter constructor() { super() @@ -15,25 +14,9 @@ export class DocViewer extends PluginClient { this.onload() } - async setProperties() { - console.log('inside setProperties') - this.on('docgen' as any, 'docsGenerated', async (docs: string[]) => { - console.log('docsGenerated', docs) - this.mdFile = docs[0] - const contents = await this.call('fileManager', 'readFile', this.mdFile) - console.log({ contents }) - this.fileContents = contents - this.eventEmitter.emit('docviewer', 'contentsReady', this.fileContents) - }) - } - async viewDocs(docs: string[]) { - console.log('viewDocs', docs) - console.log('docsGenerated', docs) this.mdFile = docs[0] const contents = await this.call('fileManager', 'readFile', this.mdFile) - console.log({ contents }) - this.fileContents = contents this.eventEmitter.emit('contentsReady', contents) } } \ No newline at end of file