From 31cc68ebf2033461b4cd9f20c939ee91a4d0328b Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Wed, 2 Dec 2015 13:26:34 -0800
Subject: PLT-1300 adding jump button to bottom of center archive channel

---
 web/react/components/center_panel.jsx | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

(limited to 'web/react/components/center_panel.jsx')

diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx
index 3c6a36ad4..e458187ff 100644
--- a/web/react/components/center_panel.jsx
+++ b/web/react/components/center_panel.jsx
@@ -13,6 +13,8 @@ import PreferenceStore from '../stores/preference_store.jsx';
 import ChannelStore from '../stores/channel_store.jsx';
 import UserStore from '../stores/user_store.jsx';
 
+import * as Utils from '../utils/utils.jsx';
+
 import Constants from '../utils/constants.jsx';
 const TutorialSteps = Constants.TutorialSteps;
 const Preferences = Constants.Preferences;
@@ -46,6 +48,8 @@ export default class CenterPanel extends React.Component {
         this.setState({showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS});
     }
     render() {
+        const channel = ChannelStore.getCurrent();
+        var handleClick = null;
         let postsContainer;
         let createPost;
         if (this.state.showTutorialScreens) {
@@ -53,7 +57,24 @@ export default class CenterPanel extends React.Component {
             createPost = null;
         } else if (this.state.showPostFocus) {
             postsContainer = <PostFocusView />;
-            createPost = null;
+
+            handleClick = function clickHandler(e) {
+                e.preventDefault();
+                Utils.switchChannel(channel);
+            };
+
+            createPost = (
+                <div
+                    id='perma-link-home'
+                >
+                    <a
+                        href=''
+                        onClick={handleClick}
+                    >
+                        {'You are viewing the Archives. Click here to jump to recent messages.'}
+                    </a>
+                </div>
+            );
         } else {
             postsContainer = <PostsViewContainer />;
             createPost = (
-- 
cgit v1.2.3-1-g7c22

