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

Function withoutCampaign

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

Source from the content-addressed store, hash-verified

44
45/** The flags, minus the boost that just stopped */
46const withoutCampaign = <T extends { campaignId?: string | null }>(
47 flags: T | undefined,
48): T | undefined => {
49 if (!flags) {
50 return flags;
51 }
52
53 const { campaignId, ...rest } = flags;
54
55 return rest as T;
56};
57
58interface UseStopBoost {
59 /** 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