jiti-meet/react/features/visitors/actions.ts

32 lines
634 B
TypeScript
Raw Normal View History

2023-02-23 18:43:16 +00:00
import { I_AM_VISITOR_MODE, UPDATE_VISITORS_COUNT } from './actionTypes';
/**
* Sets Visitors mode on or off.
*
* @param {boolean} enabled - The new visitors mode state.
* @returns {{
2023-02-23 18:43:16 +00:00
* type: I_AM_VISITOR_MODE,
* }}
*/
2023-02-23 18:43:16 +00:00
export function setIAmVisitor(enabled: boolean) {
return {
2023-02-23 18:43:16 +00:00
type: I_AM_VISITOR_MODE,
enabled
};
}
/**
* Visitors count has been updated.
*
* @param {number} count - The new visitors count.
* @returns {{
* type: UPDATE_VISITORS_COUNT,
* }}
*/
export function updateVisitorsCount(count: number) {
return {
type: UPDATE_VISITORS_COUNT,
count
};
}