Hide snackbar option to view traffic info if already on that page
This commit is contained in:
parent
30bcbd0286
commit
13bf20c2ea
11
src/App.js
11
src/App.js
@ -20,6 +20,13 @@ import closeIcon from './img/close.svg';
|
||||
|
||||
|
||||
class App extends Component {
|
||||
currentPageName = () => {
|
||||
if (globalData.currentPage.constructor !== undefined)
|
||||
return globalData.currentPage.constructor.name;
|
||||
else
|
||||
return "";
|
||||
};
|
||||
|
||||
render() {
|
||||
globalData.root = this;
|
||||
|
||||
@ -52,7 +59,9 @@ class App extends Component {
|
||||
color="inherit"
|
||||
onClick={() => { globalData.snackbarVisible = false; globalData.root.forceUpdate() }}
|
||||
>
|
||||
<Link to="/traffic">Visa trafikinfo</Link>
|
||||
{this.currentPageName() !== "TrafficInfo" &&
|
||||
<Link to="/traffic">Visa trafikinfo</Link>
|
||||
}
|
||||
<img src={closeIcon} alt="" />
|
||||
</IconButton>,
|
||||
]}
|
||||
|
@ -14,7 +14,8 @@ let globalData = {
|
||||
disruption: new Disruption(
|
||||
),
|
||||
stop: new Stop(
|
||||
)
|
||||
),
|
||||
currentPage: ""
|
||||
};
|
||||
|
||||
export default globalData;
|
@ -56,7 +56,7 @@
|
||||
|
||||
.timeColumn {
|
||||
flex-basis: 20%;
|
||||
justify-content: space-between !important;
|
||||
justify-content: flex-start !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
@ -71,17 +71,15 @@ button {
|
||||
}
|
||||
|
||||
.MuiIconButton-label {
|
||||
justify-content: space-between !important;
|
||||
justify-content: flex-end !important;
|
||||
}
|
||||
|
||||
.MuiIconButton-label a {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.MuiIconButton-label a {
|
||||
font-size: 3.5vw;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
margin-right: 5vw;
|
||||
}
|
||||
|
||||
.MuiIconButton-label img {
|
||||
|
Loading…
Reference in New Issue
Block a user