()
| 382 | }; |
| 383 | |
| 384 | export function usePostLogEvent() { |
| 385 | const { boostedBy } = useFeedCardContext(); |
| 386 | |
| 387 | return useCallback( |
| 388 | ( |
| 389 | eventName: string, |
| 390 | post: Post | ReadHistoryPost | PostBootData, |
| 391 | opts?: PostLogEventFnOptions, |
| 392 | ) => { |
| 393 | return postLogEvent(eventName, post, { |
| 394 | ...opts, |
| 395 | is_ad: opts?.is_ad || !!boostedBy, |
| 396 | }); |
| 397 | }, |
| 398 | [boostedBy], |
| 399 | ); |
| 400 | } |
no test coverage detected