revite/src/pages/App.tsx

28 lines
932 B
TypeScript
Raw Normal View History

2021-06-19 10:29:04 -04:00
import { Docked, OverlappingPanels } from "react-overlapping-panels";
import { isTouchscreenDevice } from "../lib/isTouchscreenDevice";
2021-06-19 07:34:53 -04:00
import { Switch, Route } from "react-router-dom";
2021-06-19 10:29:04 -04:00
import LeftSidebar from "../components/navigation/LeftSidebar";
import RightSidebar from "../components/navigation/RightSidebar";
2021-06-19 07:34:53 -04:00
import Home from './home/Home';
2021-06-19 13:46:05 -04:00
import Popovers from "../context/intermediate/Popovers";
2021-06-19 07:34:53 -04:00
export default function App() {
return (
<OverlappingPanels
width="100vw"
2021-06-19 10:29:04 -04:00
height="100%"
leftPanel={{ width: 292, component: <LeftSidebar /> }}
rightPanel={{ width: 240, component: <RightSidebar /> }}
docked={isTouchscreenDevice ? Docked.None : Docked.Left}>
2021-06-19 07:34:53 -04:00
<Switch>
<Route path="/">
<Home />
</Route>
</Switch>
2021-06-19 13:46:05 -04:00
<Popovers />
2021-06-19 07:34:53 -04:00
</OverlappingPanels>
);
};