forked from CodecrumbsIO/codecrumbs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
75 lines (68 loc) · 2.19 KB
/
Copy pathApp.js
File metadata and controls
75 lines (68 loc) · 2.19 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import React, { Suspense } from 'react';
import Spin from 'antd/lib/spin';
import 'antd/lib/spin/style/css';
import { isMobile } from 'utils/index';
const DataBus = React.lazy(() => import(/* webpackChunkName: "data-bus" */ 'core/dataBus'));
const ViewsSwitches = React.lazy(() =>
import(/* webpackChunkName: "view-switches" */ 'components/topBar/controls/ViewSwitches/ViewSwitchesContainer')
);
const TopBar = React.lazy(() =>
import(/* webpackChunkName: "top-bar" */ 'components/topBar/subPanel/SubPanelContainer')
);
const TreeDiagramsContainer = React.lazy(() =>
import(/* webpackChunkName: "tree-diagram" */ 'components/treeDiagram/TreeDiagramsContainer')
);
const SideBar = React.lazy(() =>
import(/* webpackChunkName: "side-bar" */ 'components/sideBar/SideBarContainer')
);
const ExplorerBar = React.lazy(() =>
import(/* webpackChunkName: "explorer-bar" */ 'components/explorerBar/ExplorerBarContainer')
);
import './App.scss';
const App = (props = {}) => {
return (
<div className="App">
<header className="header">
<Suspense fallback={null}>
<DataBus standalone={props.standalone} predefinedState={props.predefinedState} />
</Suspense>
{!isMobile ? (
<Suspense fallback={<div className={'headerPlaceholder'} />}>
<ViewsSwitches />
</Suspense>
) : null}
<Suspense fallback={null}>
<TopBar />
</Suspense>
</header>
<div className="body">
<Suspense fallback={null}>
<ExplorerBar />
</Suspense>
<Suspense
fallback={
<div className={'loader'}>
<Spin />
</div>
}
>
<TreeDiagramsContainer />
</Suspense>
<Suspense fallback={null}>
<SideBar />
</Suspense>
</div>
<footer className="footer">
<span>{`v${process.env.VERSION}`}</span>
<span>
Ⓒ Bohdan Liashenko
{' • '}
<a href="https://github.com/Bogdan-Lyashenko/codecrumbs">Github</a>
{' • '}
<a href="https://codecrumbs.io/">codecrumbs.io</a>
</span>
</footer>
</div>
);
};
export default App;