import React from "react" ; import { render } from "react-dom" ; import { BrowserRouter as Router , Redirect , Route , Switch } from "react-router-dom" ; import { Home } from "./components/home" ; import { Insights } from "./components/insights" ; import { Nextbar } from "./components/nextbar" ; const App = ( ) => ( < Router > < > < Switch > < Route exact path = "/experiment/bqml-stackoverflow/" component = { Home } / > < Route path = "/experiment/bqml-stackoverflow/insights" component = { Insights } / > < Route render = { ( ) => < Redirect to = "/experiment/bqml-stackoverflow/" / > } /> < /Switch> < a className = "opensource" target = "_blank" href = "https://github.com/GoogleCloudPlatform/showcase-experiments/tree/master/bqml-stackoverflow" > < i className = "fab fa-github" > < /i> < /a> < Nextbar > < /Nextbar> < /> < /Router>); render ( < App />, document.getElementById("root"));