From cf7a05f80f68b5b1c8bcc0089679dd497cec2506 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Sun, 14 Jun 2015 23:53:32 -0800
Subject: first commit

---
 web/react/pages/home.jsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 web/react/pages/home.jsx

(limited to 'web/react/pages/home.jsx')

diff --git a/web/react/pages/home.jsx b/web/react/pages/home.jsx
new file mode 100644
index 000000000..08dd32f73
--- /dev/null
+++ b/web/react/pages/home.jsx
@@ -0,0 +1,14 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+var ChannelStore = require('../stores/channel_store.jsx');
+var Constants = require('../utils/constants.jsx');
+
+global.window.setup_home_page = function() {
+    var last = ChannelStore.getLastVisitedName();
+    if (last == null || last.length === 0) {
+        window.location.replace("/channels/" + Constants.DEFAULT_CHANNEL);
+    } else {
+        window.location.replace("/channels/" + last);
+    }
+}
-- 
cgit v1.2.3-1-g7c22

