From ad346f8734f5419067c4988f118281955516a356 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 25 Sep 2015 09:16:26 -0700 Subject: fixing more redirect places --- web/react/components/delete_channel_modal.jsx | 3 ++- web/react/components/navbar.jsx | 2 +- web/react/components/team_signup_with_sso.jsx | 2 +- web/react/utils/utils.jsx | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'web/react') diff --git a/web/react/components/delete_channel_modal.jsx b/web/react/components/delete_channel_modal.jsx index 4efb9cb23..44c54db72 100644 --- a/web/react/components/delete_channel_modal.jsx +++ b/web/react/components/delete_channel_modal.jsx @@ -4,6 +4,7 @@ const Client = require('../utils/client.jsx'); const AsyncClient = require('../utils/async_client.jsx'); const ChannelStore = require('../stores/channel_store.jsx'); +var TeamStore = require('../stores/team_store.jsx'); export default class DeleteChannelModal extends React.Component { constructor(props) { @@ -24,7 +25,7 @@ export default class DeleteChannelModal extends React.Component { Client.deleteChannel(this.state.channelId, function handleDeleteSuccess() { AsyncClient.getChannels(true); - window.location.href = '/'; + window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square'; }, function handleDeleteError(err) { AsyncClient.dispatchError(err, 'handleDelete'); diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index da9874b0b..bdb50cd9e 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -262,7 +262,7 @@ export default class Navbar extends React.Component { return (
{channelTitle} diff --git a/web/react/components/team_signup_with_sso.jsx b/web/react/components/team_signup_with_sso.jsx index 2849b4cbb..a4972dd8d 100644 --- a/web/react/components/team_signup_with_sso.jsx +++ b/web/react/components/team_signup_with_sso.jsx @@ -42,7 +42,7 @@ export default class SSOSignUpPage extends React.Component { if (data.follow_link) { window.location.href = data.follow_link; } else { - window.location.href = '/'; + window.location.href = '/' + team.name + '/channels/town-square'; } }, function fail(err) { diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 6688436de..4b1b37397 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -4,6 +4,7 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); var ChannelStore = require('../stores/channel_store.jsx'); var UserStore = require('../stores/user_store.jsx'); +var TeamStore = require('../stores/team_store.jsx'); var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; var AsyncClient = require('./async_client.jsx'); @@ -113,7 +114,7 @@ export function notifyMe(title, body, channel) { if (channel) { switchChannel(channel); } else { - window.location.href = '/'; + window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square'; } }; setTimeout(function closeNotificationOnTimeout() { -- cgit v1.2.3-1-g7c22