|
|
@@ -1,5 +1,4 @@
|
|
|
import React from 'react';
|
|
|
-import ReactDOM from 'react-dom';
|
|
|
import ReactMarkdown from 'react-markdown';
|
|
|
import { Switch, Route, HashRouter, Link } from 'react-router-dom';
|
|
|
import About from './components/About';
|
|
|
@@ -8,12 +7,12 @@ import Navbar from './components/Navbar';
|
|
|
import Page from './components/Page';
|
|
|
const markdown = require('./resources/markdown.json');
|
|
|
|
|
|
-const $leftPanel = $('#left-panel');
|
|
|
-const $window = $(window);
|
|
|
-function onResize() {
|
|
|
- $leftPanel.css('max-height', $window.height());
|
|
|
-}
|
|
|
-$window.on('resize', onResize);
|
|
|
+// const $leftPanel = $('#left-panel');
|
|
|
+// const $window = $(window);
|
|
|
+// function onResize() {
|
|
|
+// $leftPanel.css('max-height', $window.height());
|
|
|
+// }
|
|
|
+// $window.on('resize', onResize);
|
|
|
|
|
|
function getSection(sectionIndex) {
|
|
|
const section = markdown[sectionIndex];
|
|
|
@@ -89,7 +88,7 @@ function getSectionRoutes(section, sIndex) {
|
|
|
return routes.map(r => <Route key={r.key} exact path={r.path} component={r.component} />);
|
|
|
}
|
|
|
|
|
|
-ReactDOM.render(
|
|
|
+const App = () => (
|
|
|
<HashRouter>
|
|
|
<div id="react-wrapper">
|
|
|
<Navbar />
|
|
|
@@ -103,6 +102,7 @@ ReactDOM.render(
|
|
|
</Switch>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </HashRouter>,
|
|
|
- document.getElementById('left-panel')
|
|
|
+ </HashRouter>
|
|
|
);
|
|
|
+
|
|
|
+export default App;
|