()
| 280 | }; |
| 281 | |
| 282 | export function usePostLogEvent() { |
| 283 | const { boostedBy } = useFeedCardContext(); |
| 284 | |
| 285 | return useCallback( |
| 286 | ( |
| 287 | eventName: string, |
| 288 | post: Post | ReadHistoryPost | PostBootData, |
| 289 | opts?: PostLogEventFnOptions, |
| 290 | ) => { |
| 291 | return postLogEvent(eventName, post, { |
| 292 | ...opts, |
| 293 | is_ad: !!boostedBy, |
| 294 | }); |
| 295 | }, |
| 296 | [boostedBy], |
| 297 | ); |
| 298 | } |
no test coverage detected