vn-verdnaturachat/app/actions/activeUsers.ts

20 lines
465 B
TypeScript
Raw Normal View History

import { Action } from 'redux';
import { IActiveUsers } from '../reducers/activeUsers';
import { ACTIVE_USERS } from './actionsTypes';
interface ISetActiveUsers extends Action {
activeUsers: IActiveUsers;
}
export type TActionActiveUsers = ISetActiveUsers;
export const setActiveUsers = (activeUsers: IActiveUsers): ISetActiveUsers => ({
type: ACTIVE_USERS.SET,
activeUsers
});
export const clearActiveUsers = (): Action => ({
type: ACTIVE_USERS.CLEAR
});