summaryrefslogtreecommitdiffstats
path: root/web/react/pages/home.jsx
blob: ff81c499459e8c6310ae67949dc2c1437f24e10e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import TeamStore from '../stores/team_store.jsx';
import Constants from '../utils/constants.jsx';

function setupHomePage() {
    var last = null;
    if (last == null || last.length === 0) {
        window.location = TeamStore.getCurrentTeamUrl() + '/channels/' + Constants.DEFAULT_CHANNEL;
    } else {
        window.location = TeamStore.getCurrentTeamUrl() + '/channels/' + last;
    }
}

global.window.setup_home_page = setupHomePage;