diff --git a/src/App.js b/src/App.js index 41a973a..fd40510 100644 --- a/src/App.js +++ b/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() }} > - Visa trafikinfo + {this.currentPageName() !== "TrafficInfo" && + Visa trafikinfo + } , ]} diff --git a/src/GlobalData.js b/src/GlobalData.js index fa6caba..d6a3f4b 100644 --- a/src/GlobalData.js +++ b/src/GlobalData.js @@ -14,7 +14,8 @@ let globalData = { disruption: new Disruption( ), stop: new Stop( - ) + ), + currentPage: "" }; export default globalData; \ No newline at end of file diff --git a/src/components/css/TrafficInfo.css b/src/components/css/TrafficInfo.css index e1052a4..abfb678 100644 --- a/src/components/css/TrafficInfo.css +++ b/src/components/css/TrafficInfo.css @@ -56,7 +56,7 @@ .timeColumn { flex-basis: 20%; - justify-content: space-between !important; + justify-content: flex-start !important; align-items: center; } diff --git a/src/index.css b/src/index.css index 7071e84..8bab8fb 100644 --- a/src/index.css +++ b/src/index.css @@ -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 {