aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/views/Header.js
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-10-08 09:16:38 +0000
committerEmiliano Ciavatta2020-10-08 09:16:38 +0000
commit2b2b8e66e7244592672c283fe7bb5d9a1fd9da99 (patch)
tree9a1d35e7a16246ad22feb64e16018e2ed1b93948 /frontend/src/views/Header.js
parent659833be506e86de277d23f4b48ecce422cfaa5d (diff)
Minor changes
Diffstat (limited to 'frontend/src/views/Header.js')
-rw-r--r--frontend/src/views/Header.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/frontend/src/views/Header.js b/frontend/src/views/Header.js
index 944f1d5..f5eff17 100644
--- a/frontend/src/views/Header.js
+++ b/frontend/src/views/Header.js
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
import Typed from 'typed.js';
import './Header.scss';
import {filtersDefinitions, filtersNames} from "../components/filters/FiltersDefinitions";
-import {Link} from "react-router-dom";
+import {Link, withRouter} from "react-router-dom";
import ButtonField from "../components/fields/ButtonField";
class Header extends Component {
@@ -46,7 +46,7 @@ class Header extends Component {
render() {
let quickFilters = filtersNames.filter(name => this.state[`${name}_active`])
- .map(name => <React.Fragment key={name} >{filtersDefinitions[name]}</React.Fragment>)
+ .map(name => <React.Fragment key={name}>{filtersDefinitions[name]}</React.Fragment>)
.slice(0, 5);
return (
@@ -68,18 +68,18 @@ class Header extends Component {
<div className="col">
<div className="header-buttons">
- <ButtonField variant="pink" onClick={this.props.onOpenFilters} name="filters" bordered />
- <Link to="/pcaps">
- <ButtonField variant="purple" name="pcaps" bordered />
+ <ButtonField variant="pink" onClick={this.props.onOpenFilters} name="filters" bordered/>
+ <Link to={"/pcaps" + this.props.location.search}>
+ <ButtonField variant="purple" name="pcaps" bordered/>
</Link>
- <Link to="/rules">
- <ButtonField variant="deep-purple" name="rules" bordered />
+ <Link to={"/rules" + this.props.location.search}>
+ <ButtonField variant="deep-purple" name="rules" bordered/>
</Link>
- <Link to="/services">
- <ButtonField variant="indigo" name="services" bordered />
+ <Link to={"/services" + this.props.location.search}>
+ <ButtonField variant="indigo" name="services" bordered/>
</Link>
- <Link to="/config">
- <ButtonField variant="blue" name="config" bordered />
+ <Link to={"/config" + this.props.location.search}>
+ <ButtonField variant="blue" name="config" bordered/>
</Link>
</div>
</div>
@@ -89,4 +89,4 @@ class Header extends Component {
}
}
-export default Header;
+export default withRouter(Header);