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

Function generateEvent

packages/shared/src/hooks/log/useLogContextData.ts:36–48  ·  view source on GitHub ↗
(
  event: LogEvent,
  sharedPropsRef: MutableRefObject<Partial<LogEvent>>,
  page: string,
  now = new Date(),
)

Source from the content-addressed store, hash-verified

34});
35
36const generateEvent = (
37 event: LogEvent,
38 sharedPropsRef: MutableRefObject<Partial<LogEvent>>,
39 page: string,
40 now = new Date(),
41): LogEvent => ({
42 ...sharedPropsRef.current,
43 ...getGlobalSharedProps(),
44 event_timestamp: now,
45 event_id: generateEventId(now),
46 event_page: page,
47 ...event,
48});
49
50export default function useLogContextData(
51 pushToQueue: PushToQueueFunc,

Callers 2

logEventFunction · 0.85
logEventStartFunction · 0.85

Calls 2

getGlobalSharedPropsFunction · 0.85
generateEventIdFunction · 0.85

Tested by

no test coverage detected