-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
49 lines (41 loc) · 1.24 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react'
import { Routes, Route } from 'react-router-dom'
import molecule, { create } from '@dtinsight/molecule'
import '@dtinsight/molecule/esm/style/mo.css'
import extensions from './extensions'
import MoveWorkbench from './views/Workbench'
// import './App.css'
// import dotenv from 'dotenv'
// dotenv.config()
console.log('env app', process.env.REACT_APP_RPC_PORT)
;(window as any).__DEVELOPMENT__ = false
function NotFound() {
return (
<main style={{ padding: '1rem' }}>
<p className="text-black-500">There's nothing here!</p>
</main>
)
}
const movelgoInst = create({
extensions,
})
// movelgoInst.onBeforeInit(() => {
// molecule.builtin.inactiveModule('activityBarData')
// })
movelgoInst.onBeforeInit(() =>
molecule.builtin.inactiveConstant('EXPLORER_TOGGLE_VERTICAL')
)
// const DefaultWorkbench = () => moleculeInst.render(<Workbench />)
const CustomWorkbench = () => movelgoInst.render(<MoveWorkbench />)
function App() {
return (
<div className="App">
<Routes>
<Route path="/" element={<CustomWorkbench />} />
{/* <Route path="vscode" element={<DefaultWorkbench />} /> */}
<Route path="*" element={<NotFound />} />
</Routes>
</div>
)
}
export default App