()
| 336 | }; |
| 337 | |
| 338 | export function usePostLogEvent() { |
| 339 | const { boostedBy } = useFeedCardContext(); |
| 340 | |
| 341 | return useCallback( |
| 342 | ( |
| 343 | eventName: string, |
| 344 | post: Post | ReadHistoryPost | PostBootData, |
| 345 | opts?: PostLogEventFnOptions, |
| 346 | ) => { |
| 347 | return postLogEvent(eventName, post, { |
| 348 | ...opts, |
| 349 | is_ad: !!boostedBy, |
| 350 | }); |
| 351 | }, |
| 352 | [boostedBy], |
| 353 | ); |
| 354 | } |
no test coverage detected