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

Function widget

packages/shared/src/features/feedWidgets/slots.spec.ts:14–19  ·  view source on GitHub ↗
(id: string, slot?: number)

Source from the content-addressed store, hash-verified

12} from './slots';
13
14const widget = (id: string, slot?: number): FeedWidget => ({
15 id,
16 kind: FeedWidgetKind.Streak,
17 size: FeedWidgetSize.Tall,
18 ...(slot === undefined ? {} : { slot }),
19});
20
21const slotsOf = (widgets: FeedWidget[]) =>
22 widgets.map(({ id, slot }) => [id, slot]);

Callers 1

slots.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected