diff --git a/src/states/Dashboard.js b/src/states/Dashboard.js index 8e42e56..518a885 100644 --- a/src/states/Dashboard.js +++ b/src/states/Dashboard.js @@ -399,11 +399,29 @@ class Dashboard extends Component { this.setState({ ...this.state, rename: null })} sensor={this.state.rename} updateSensor={(s) => this.updateSensor(s)} /> this.resetOrder(yes)} /> + {!this.getCurrentSensor() && } ) } } +function ExtraPadding() { + const [extraBottomPadding, setExtraBottomPadding] = React.useState(window.innerHeight < 800 ? 20 : 0); + + React.useEffect(() => { + const handleResize = () => { + setExtraBottomPadding(window.innerHeight < 800 ? 20 : 0); + }; + + window.addEventListener('resize', handleResize); + return () => { + window.removeEventListener('resize', handleResize); + }; + }, []); + + return ; +} + export default withTranslation()(withColorMode((props) => (