Store selected tab in the URL

This commit is contained in:
khlieng 2015-02-22 08:57:52 +01:00
parent b83efcbb9e
commit cc743a837a
7 changed files with 44 additions and 15 deletions

View file

@ -6,6 +6,12 @@ var tabActions = Reflux.createActions([
'select'
]);
tabActions.select.preEmit = () => routeActions.navigate('app');
tabActions.select.preEmit = (server, channel) => {
if (channel) {
routeActions.navigate('/' + server + '/' + channel.slice(1))
} else {
routeActions.navigate('/' + server);
}
};
module.exports = tabActions;