()
| 344 | }; |
| 345 | |
| 346 | export function usePostLogEvent() { |
| 347 | const { boostedBy } = useFeedCardContext(); |
| 348 | |
| 349 | return useCallback( |
| 350 | ( |
| 351 | eventName: string, |
| 352 | post: Post | ReadHistoryPost | PostBootData, |
| 353 | opts?: PostLogEventFnOptions, |
| 354 | ) => { |
| 355 | return postLogEvent(eventName, post, { |
| 356 | ...opts, |
| 357 | is_ad: !!boostedBy, |
| 358 | }); |
| 359 | }, |
| 360 | [boostedBy], |
| 361 | ); |
| 362 | } |
no test coverage detected