Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewards-integration - new action signal names #82

Merged
different signal types
  • Loading branch information
trickpattyFH20 committed May 25, 2018
commit eb4d448449dd9cbc8c894d6caa5a7add7a698f3e
@@ -68,6 +68,7 @@ class HotDog extends Component {
offerId,
actionId,
origin: 'rewards-hotdog-card',
type: 'offer-action-signal'
};
this.messageBackground('rewardSignal', message);
}
@@ -121,6 +121,7 @@ class OfferCard extends Component {
offerId,
actionId,
origin: 'rewards-hotdog-card',
type: (actionId === 'rewards_off') ? 'action-signal' : 'offer-action-signal',
};
this.messageBackground('rewardSignal', message);
}
@@ -82,12 +82,14 @@ export function setOfferRead(id) {
* @return {Object}
*/
export function sendSignal(actionId, offerId) {
return {
const signal = {
type: SEND_SIGNAL,
data: {
actionId,
offerId,
origin: 'rewards-hub'
origin: 'rewards-hub',
type: offerId ? 'offer-action-signal' : 'action-signal'
}
};
return signal;
}
@@ -50,10 +50,12 @@ class Rewards {
}

sendSignal(message) {
const { offerId, actionId, origin } = message;
const {
offerId, actionId, origin, type
} = message;
const signal = {
type,
origin: origin ? `ghostery-${origin}` : 'ghostery',
type: 'offer-action-signal',
data: {
action_id: actionId,
offer_id: offerId
ProTip! Use n and p to navigate between commits in a pull request.