summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/LandscapeWarning.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/views/LandscapeWarning.js b/src/views/LandscapeWarning.js
index 389e8a6..1c8e61c 100644
--- a/src/views/LandscapeWarning.js
+++ b/src/views/LandscapeWarning.js
@@ -27,12 +27,11 @@ const RotateIcon = (
);
export default class LandscapeWarning extends Component {
- state = {
- landscape: !isMobile || window.innerWidth > window.innerHeight,
- };
-
constructor(props) {
super(props);
+ this.state = {
+ landscape: !isMobile || window.innerWidth > window.innerHeight,
+ };
this.handleResize = this.handleResize.bind(this);
if (isMobile) {
window.addEventListener("resize", this.handleResize);