2022-01-24 20:12:36 +00:00
|
|
|
import { Action } from 'redux';
|
|
|
|
|
|
|
|
import { IActiveUsers } from '../reducers/activeUsers';
|
2022-02-28 18:00:47 +00:00
|
|
|
import { ACTIVE_USERS } from './actionsTypes';
|
2022-01-24 20:12:36 +00:00
|
|
|
|
2022-02-28 18:00:47 +00:00
|
|
|
interface ISetActiveUsers extends Action {
|
2022-01-24 20:12:36 +00:00
|
|
|
activeUsers: IActiveUsers;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TActionActiveUsers = ISetActiveUsers;
|
|
|
|
|
|
|
|
export const setActiveUsers = (activeUsers: IActiveUsers): ISetActiveUsers => ({
|
2022-02-28 18:00:47 +00:00
|
|
|
type: ACTIVE_USERS.SET,
|
2022-01-24 20:12:36 +00:00
|
|
|
activeUsers
|
|
|
|
});
|
2022-02-28 18:00:47 +00:00
|
|
|
|
|
|
|
export const clearActiveUsers = (): Action => ({
|
|
|
|
type: ACTIVE_USERS.CLEAR
|
|
|
|
});
|