jiridanek commented on a change in pull request #1517: URL: https://github.com/apache/qpid-dispatch/pull/1517#discussion_r807960231
########## File path: console/react/src/App.js ########## @@ -28,26 +29,22 @@ import "@patternfly/patternfly/components/Nav/nav.css"; import { QDRService } from "./common/qdrService"; import "./App.css"; import PageLayout from "./overview/dashboard/layout"; -class App extends Component { - state = {}; - - render() { - // service is passed in to make testing easier - const service = new QDRService(); - // also, a router is used here to provide PageLayout with a history property - return ( - <Router> - <div className="App pf-m-redhat-font"> - <Route - path="/" - render={props => ( - <PageLayout service={service} {...props} config={this.props.config} /> - )} - /> - </div> - </Router> - ); - } + +function App(props) { + + // service is passed in to make testing easier + let service = new QDRService(); + + // also, a router is used here to provide PageLayout with a history property + let history = createHashHistory({ window }); + + return ( + <HistoryRouter history={history}> Review comment: Because the code of some components nested further in needs to have `history` instance in properties. That is not available in react-router-dom v6 unless I put it there. And `HistoryRouter` is the way to inject `history`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org