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

Function withoutCampaign

packages/shared/src/features/boost/useStopBoost.ts:37–47  ·  view source on GitHub ↗
(
  flags: T | undefined,
)

Source from the content-addressed store, hash-verified

35
36/** The flags, minus the boost that just stopped */
37const withoutCampaign = <T extends { campaignId?: string | null }>(
38 flags: T | undefined,
39): T | undefined => {
40 if (!flags) {
41 return flags;
42 }
43
44 const { campaignId, ...rest } = flags;
45
46 return rest as T;
47};
48
49interface UseStopBoost {
50 /** Asks first, then stops the boost and refunds its unspent Cores */

Callers 1

clearBoostedFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected