mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
26 lines
524 B
JavaScript
26 lines
524 B
JavaScript
import { CLOSE_TAB, CHANGE_TAB } from '../constants/tabs';
|
|
import { userExitSession, setActiveSession } from './sessions';
|
|
|
|
export function closeTab (uid) {
|
|
return (dispatch, getState) => {
|
|
dispatch({
|
|
type: CLOSE_TAB,
|
|
uid,
|
|
effect () {
|
|
dispatch(userExitSession(uid));
|
|
}
|
|
});
|
|
};
|
|
}
|
|
|
|
export function changeTab (uid) {
|
|
return (dispatch, getState) => {
|
|
dispatch({
|
|
type: CHANGE_TAB,
|
|
uid,
|
|
effect () {
|
|
dispatch(setActiveSession(uid));
|
|
}
|
|
});
|
|
};
|
|
}
|