Skip to content

Instantly share code, notes, and snippets.

@emyann
Created January 5, 2019 20:12
Show Gist options
  • Save emyann/140c47ad277881927ede728063e0c4e7 to your computer and use it in GitHub Desktop.
Save emyann/140c47ad277881927ede728063e0c4e7 to your computer and use it in GitHub Desktop.
import { makeActionCreator } from '../actions/actionCreators';
import { Call } from '@jive/realtime-events';
export enum ActionsType {
START_INCOMING_CALL = 'callEvents/startIncomingCall',
START_INCOMING_CONVERSATION = 'callEvents/startIncomingConversation',
}
type ActionPayload = { call: Call }
export const startIncomingCall = makeActionCreator<ActionPayload, ActionsType.START_INCOMING_CALL>(
ActionsType.START_INCOMING_CALL,
);
export const startIncomingConversation = makeActionCreator<ActionPayload, ActionsType.START_INCOMING_CONVERSATION>(
ActionsType.START_INCOMING_CONVERSATION,
);
export type CallEventsActions =
| ReturnType<typeof startIncomingCall>
| ReturnType<typeof startIncomingConversation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment