2022-01-11 13:48:01 +00:00
|
|
|
import { Action } from 'redux';
|
|
|
|
|
|
|
|
import { IActiveUsers } from '../reducers/activeUsers';
|
2022-02-09 20:44:53 +00:00
|
|
|
import { ACTIVE_USERS } from './actionsTypes';
|
2022-01-11 13:48:01 +00:00
|
|
|
|
2022-02-02 18:27:10 +00:00
|
|
|
interface ISetActiveUsers extends Action {
|
2022-01-11 13:48:01 +00:00
|
|
|
activeUsers: IActiveUsers;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TActionActiveUsers = ISetActiveUsers;
|
|
|
|
|
|
|
|
export const setActiveUsers = (activeUsers: IActiveUsers): ISetActiveUsers => ({
|
2022-02-09 20:44:53 +00:00
|
|
|
type: ACTIVE_USERS.SET,
|
2022-01-11 13:48:01 +00:00
|
|
|
activeUsers
|
|
|
|
});
|
2022-02-09 20:44:53 +00:00
|
|
|
|
|
|
|
export const clearActiveUsers = (): Action => ({
|
|
|
|
type: ACTIVE_USERS.CLEAR
|
|
|
|
});
|