()
| 369 | }; |
| 370 | |
| 371 | export function usePostLogEvent() { |
| 372 | const { boostedBy } = useFeedCardContext(); |
| 373 | |
| 374 | return useCallback( |
| 375 | ( |
| 376 | eventName: string, |
| 377 | post: Post | ReadHistoryPost | PostBootData, |
| 378 | opts?: PostLogEventFnOptions, |
| 379 | ) => { |
| 380 | return postLogEvent(eventName, post, { |
| 381 | ...opts, |
| 382 | is_ad: !!boostedBy, |
| 383 | }); |
| 384 | }, |
| 385 | [boostedBy], |
| 386 | ); |
| 387 | } |
no test coverage detected