aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/App.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-08 20:53:45 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit1a9fb01bcf64a4016fc8167f51871df1a85b692d (patch)
treec8d202ce2722a62208dc3e6e1a10ca9f0d3ded9a /vnext/src/App.js
parente46fe57e15cda3869b07c624bbc138c441055a9a (diff)
Cleanup ESLint warnings
Diffstat (limited to 'vnext/src/App.js')
-rw-r--r--vnext/src/App.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js
index 6fcf3d9c..4931af0a 100644
--- a/vnext/src/App.js
+++ b/vnext/src/App.js
@@ -1,4 +1,6 @@
import React, { useState, useEffect } from 'react';
+import PropTypes from 'prop-types';
+import ReactRouterPropTypes from 'react-router-prop-types';
import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom';
import qs from 'qs';
@@ -29,7 +31,7 @@ export default function App(props) {
uid: 0,
hash: cookies.load('hash')
});
-
+
let updateStatus = () => {
// refresh server visitor state (unread counters)
me().then(visitor => {
@@ -52,20 +54,20 @@ export default function App(props) {
};
es.onerror = () => {
es.removeEventListener('read', updateStatus);
- }
+ };
setEs(es);
}, []);
-
+
let search = (history, pathname, searchString) => {
let location = {};
location.pathname = pathname;
location.search = `?search=${searchString}`;
history.push(location);
- }
+ };
let auth = (visitor) => {
setVisitor(visitor);
- }
+ };
return (
<Router>
<>
@@ -157,3 +159,8 @@ export default function App(props) {
</Router>
);
}
+
+App.propTypes = {
+ match: ReactRouterPropTypes.match.isRequired
+};
+