[ 
https://issues.apache.org/jira/browse/DISPATCH-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493233#comment-17493233
 ] 

ASF GitHub Bot commented on DISPATCH-2234:
------------------------------------------

jiridanek commented on a change in pull request #1517:
URL: https://github.com/apache/qpid-dispatch/pull/1517#discussion_r807959792



##########
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();

Review comment:
       :+1: 

##########
File path: console/react/src/overview/dashboard/layout.test.js
##########
@@ -21,6 +21,7 @@ import React from "react";
 import { render } from "@testing-library/react";
 import { service } from "../../serviceTest";
 import PageLayout from "./layout";
+import {MemoryRouter} from "react-router-dom";

Review comment:
       `MemoryRouter` is intended for testing in nodejs (outside of browser). 
`HistoryRouter` is meant to allow injecting your own `history` instance. 
(https://reactrouter.com/docs/en/v6/api#setup)




-- 
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


> Update JavaScript console packages for the 1.19.0 release
> ---------------------------------------------------------
>
>                 Key: DISPATCH-2234
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2234
>             Project: Qpid Dispatch
>          Issue Type: Task
>          Components: Console
>            Reporter: Jiri Daněk
>            Assignee: Jiri Daněk
>            Priority: Major
>             Fix For: 1.19.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to