MCPcopy Create free account
hub / github.com/dailydotdev/apps / handleClick

Function handleClick

packages/shared/src/components/plus/PlusExtension.tsx:22–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 const { productOptions } = usePaymentContext();
21
22 const handleClick = () => {
23 if (!marketingCta?.campaignId) {
24 throw new Error('PlusExtension requires a marketing CTA campaign id');
25 }
26
27 logEvent({
28 event_name: LogEvent.UpgradeSubscription,
29 target_type: TargetType.MarketingCtaPlus,
30 target_id: marketingCta.campaignId,
31 extra: JSON.stringify({
32 origin: Origin.InAppPromotion,
33 }),
34 });
35 };
36
37 const experiment = useFeature(plusTakeoverContent);
38 const [selectedOption, setSelectedOption] = useState<string | null>(null);

Callers

nothing calls this directly

Calls 1

logEventFunction · 0.85

Tested by

no test coverage detected