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

Function generateEvent

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

Source from the content-addressed store, hash-verified

29});
30
31const generateEvent = (
32 event: LogEvent,
33 sharedPropsRef: MutableRefObject<Partial<LogEvent>>,
34 page: string,
35 now = new Date(),
36): LogEvent => ({
37 ...sharedPropsRef.current,
38 ...getGlobalSharedProps(),
39 event_timestamp: now,
40 event_id: generateLogEventId(now),
41 event_page: page,
42 ...event,
43});
44
45export default function useLogContextData(
46 pushToQueue: PushToQueueFunc,

Callers 2

logEventFunction · 0.85
logEventStartFunction · 0.85

Calls 2

generateLogEventIdFunction · 0.90
getGlobalSharedPropsFunction · 0.85

Tested by

no test coverage detected