Skip to content

Instantly share code, notes, and snippets.

@nazariyv
Created March 12, 2020 15:16
Show Gist options
  • Save nazariyv/9447ff6e0603f9c9c29faa8d93824b2d to your computer and use it in GitHub Desktop.
Save nazariyv/9447ff6e0603f9c9c29faa8d93824b2d to your computer and use it in GitHub Desktop.
App.js
import React from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import { Client as Styletron } from "styletron-engine-atomic";
import { Provider as StyletronProvider } from "styletron-react";
import { LightTheme, BaseProvider, styled } from "baseui";
const engine = new Styletron();
const Centered = styled("div", {
display: "flex",
justifyContent: "center",
alignItems: "center",
height: "100%"
});
function App() {
return (
<StyletronProvider value={engine}>
<BaseProvider theme={LightTheme}>
<Centered>
<Router>
<Switch>
<Route path="/" exact></Route>
<Route path="/create-escrow" exact></Route>
<Route path="/check-escrow" exact></Route>
<Route path="/approve-escrow" exact></Route>
<Route path="/release-escrow" exact></Route>
<Route path="/how-it-works" exact></Route>
</Switch>
</Router>
</Centered>
</BaseProvider>
</StyletronProvider>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment