Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import { Action } from '@ngrx/store';
  2. import { ClubsState, SortState } from './clubs.state';
  3.  
  4. export const enum ClubsActionType {
  5. REQUEST_CLUBS = '[CLUBS MODULE] REQUEST_CLUBS',
  6. RESPOND_CLUBS = '[CLUBS MODULE] RESPOND_CLUBS',
  7. SORT_CLUBS = '[CLUBS MODULE] SORT_CLUBS'
  8. }
  9.  
  10. export class RequestClubsAction implements Action {
  11. readonly type: ClubsActionType = ClubsActionType.REQUEST_CLUBS;
  12. }
  13.  
  14. export class RespondClubsAction implements Action {
  15. readonly type: ClubsActionType = ClubsActionType.RESPOND_CLUBS;
  16.  
  17. constructor(public payload: { clubs: ClubsState[] }) {}
  18. }
  19.  
  20. export class SortClubsAction implements Action {
  21. readonly type: ClubsActionType = ClubsActionType.SORT_CLUBS;
  22.  
  23. constructor(public payload: { sort: SortState }) {}
  24. }
  25.  
  26. export type ClubAction =
  27. | RequestClubsAction
  28. | RespondClubsAction
  29. | SortClubsAction;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement