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.js 768B

12345678910111213141516171819202122232425262728293031323334
  1. // @flow
  2. import { NEW_CALENDAR_ENTRY_LIST, NEW_KNOWN_DOMAIN } from './actionTypes';
  3. /**
  4. * Sends an action to update the current calendar list in redux.
  5. *
  6. * @param {Array<Object>} events - The new list.
  7. * @returns {{
  8. * type: NEW_CALENDAR_ENTRY_LIST,
  9. * events: Array<Object>
  10. * }}
  11. */
  12. export function updateCalendarEntryList(events: Array<Object>) {
  13. return {
  14. type: NEW_CALENDAR_ENTRY_LIST,
  15. events
  16. };
  17. }
  18. /**
  19. * Sends an action to add a new known domain if not present yet.
  20. *
  21. * @param {string} domainName - The new domain.
  22. * @returns {{
  23. * type: NEW_KNOWN_DOMAIN,
  24. * domainName: string
  25. * }}
  26. */
  27. export function maybeAddNewKnownDomain(domainName: string) {
  28. return {
  29. type: NEW_KNOWN_DOMAIN,
  30. domainName
  31. };
  32. }