@@ -5,12 +5,12 @@ import * as vscode from 'vscode';
55import * as hljs from 'highlight.js/lib/highlight' ;
66import * as markdownitContainer from 'markdown-it-container' ;
77import * as Prism from 'prismjs' ;
8- import React from 'react' ;
98import ReactTreeView from 'react-vsc-treeview' ;
109import * as S from 'string' ;
1110
1211import { initializeAPIClient } from './api' ;
1312import { registerCommands } from './commands' ;
13+ import { createWithContainer } from './treeReactApp/AppContainer' ;
1414import { History , MyNotes , TeamNotes } from './treeReactApp/pages' ;
1515
1616require ( 'prismjs/components/prism-wiki' ) ;
@@ -211,9 +211,23 @@ export async function activate(context: vscode.ExtensionContext) {
211211
212212 registerCommands ( context ) ;
213213
214- context . subscriptions . push ( ReactTreeView . render ( React . createElement ( MyNotes ) , 'hackmd.tree.my-notes' ) ) ;
215- context . subscriptions . push ( ReactTreeView . render ( React . createElement ( History ) , 'hackmd.tree.recent-notes' ) ) ;
216- context . subscriptions . push ( ReactTreeView . render ( React . createElement ( TeamNotes ) , 'hackmd.tree.team-notes' ) ) ;
214+ console . log ( context . extensionPath , 'context.extensionPath' ) ;
215+
216+ context . subscriptions . push (
217+ ReactTreeView . render ( createWithContainer ( MyNotes , { extensionPath : context . extensionPath } ) , 'hackmd.tree.my-notes' )
218+ ) ;
219+ context . subscriptions . push (
220+ ReactTreeView . render (
221+ createWithContainer ( History , { extensionPath : context . extensionPath } ) ,
222+ 'hackmd.tree.recent-notes'
223+ )
224+ ) ;
225+ context . subscriptions . push (
226+ ReactTreeView . render (
227+ createWithContainer ( TeamNotes , { extensionPath : context . extensionPath } ) ,
228+ 'hackmd.tree.team-notes'
229+ )
230+ ) ;
217231
218232 return {
219233 extendMarkdownIt ( md : any ) {
0 commit comments