()
| 16 | } |
| 17 | |
| 18 | export const useFetchAd = (): UseFetchAds => { |
| 19 | const boostsEnabled = useFeature(featurePostBoostAds); |
| 20 | |
| 21 | const fetchAdQuery: UseFetchAds['fetchAd'] = useCallback( |
| 22 | ({ active, placement = AdPlacement.Feed }) => { |
| 23 | return fetchAdByPlacement( |
| 24 | resolveAdFetchOptions({ |
| 25 | placement, |
| 26 | active, |
| 27 | boostsEnabled, |
| 28 | }), |
| 29 | ); |
| 30 | }, |
| 31 | [boostsEnabled], |
| 32 | ); |
| 33 | |
| 34 | return { |
| 35 | fetchAd: fetchAdQuery, |
| 36 | }; |
| 37 | }; |
no test coverage detected