From d3f99e821733b7c86ad297c136489678a2a9fffb Mon Sep 17 00:00:00 2001
From: Antti Ahti <antti.ahti@gmail.com>
Date: Fri, 16 Oct 2015 12:32:19 +0300
Subject: Handle window resize events in React way

Use the React-way of handling resize events. Essentially store the window size in component state instead of doing some custom handling.

See http://facebook.github.io/react/tips/dom-event-listeners.html
---
 web/react/utils/utils.jsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'web/react/utils/utils.jsx')

diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index fb0690d66..5f266bba3 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -968,3 +968,11 @@ export function getShortenedTeamURL() {
     }
     return teamURL + '/';
 }
+
+export function windowWidth() {
+    return $(window).width();
+}
+
+export function windowHeight() {
+    return $(window).height();
+}
-- 
cgit v1.2.3-1-g7c22

