Store selected tab in the URL
This commit is contained in:
parent
b83efcbb9e
commit
cc743a837a
7 changed files with 44 additions and 15 deletions
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue