You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.ts 634B

12345678910111213141516171819202122232425262728293031
  1. import { I_AM_VISITOR_MODE, UPDATE_VISITORS_COUNT } from './actionTypes';
  2. /**
  3. * Sets Visitors mode on or off.
  4. *
  5. * @param {boolean} enabled - The new visitors mode state.
  6. * @returns {{
  7. * type: I_AM_VISITOR_MODE,
  8. * }}
  9. */
  10. export function setIAmVisitor(enabled: boolean) {
  11. return {
  12. type: I_AM_VISITOR_MODE,
  13. enabled
  14. };
  15. }
  16. /**
  17. * Visitors count has been updated.
  18. *
  19. * @param {number} count - The new visitors count.
  20. * @returns {{
  21. * type: UPDATE_VISITORS_COUNT,
  22. * }}
  23. */
  24. export function updateVisitorsCount(count: number) {
  25. return {
  26. type: UPDATE_VISITORS_COUNT,
  27. count
  28. };
  29. }