hyper/lib/actions/header.js
Matheus Fernandes 1866104d03 [WIP] Use XO instead of Standard (#723)
* Bump `eslint-plugin-react`

* Add `eslint-config-xo-react`

* Add XO

* Remove eslint-related dependencies, add XO config and use XO as the linter

* Code style: Standard => XO 

* Use xo property to ignore files

* Fix remaining errors
2016-09-21 16:27:11 +02:00

51 lines
939 B
JavaScript

import {CLOSE_TAB, CHANGE_TAB} from '../constants/tabs';
import {UI_WINDOW_MAXIMIZE, UI_WINDOW_UNMAXIMIZE} from '../constants/ui';
import rpc from '../rpc';
import {userExitSession, setActiveSession} from './sessions';
export function closeTab(uid) {
return dispatch => {
dispatch({
type: CLOSE_TAB,
uid,
effect() {
dispatch(userExitSession(uid));
}
});
};
}
export function changeTab(uid) {
return dispatch => {
dispatch({
type: CHANGE_TAB,
uid,
effect() {
dispatch(setActiveSession(uid));
}
});
};
}
export function maximize() {
return dispatch => {
dispatch({
type: UI_WINDOW_MAXIMIZE,
effect() {
rpc.emit('maximize');
}
});
};
}
export function unmaximize() {
return dispatch => {
dispatch({
type: UI_WINDOW_UNMAXIMIZE,
effect() {
rpc.emit('unmaximize');
}
});
};
}