blob: b64d2336b02dd71b4cc7dd9d61a9a86cf5eabcf7 (
plain) (
blame)
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
|
import React, { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
function LoadingView(props) {
return (
<div id="body">
<div id="header">
<div id="header_wrapper">
<div id="logo">
<a href="/">Juick</a>
</div>
<div id="search">
<form>
<input name="search" className="text" placeholder="Search..." />
</form>
</div>
<nav id="global"></nav>
</div>
</div>
<div id="wrapper"></div>
</div>
);
}
const Juick = lazy(() => import('./App'));
const JuickApp = () => (
<Suspense fallback={LoadingView}>
<Juick />
</Suspense>
);
ReactDOM.render(<JuickApp />, document.getElementById('body'));
|