SHARE
TWEET

Untitled

a guest Jul 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top