bigbuffet-rw/app/soapbox/features/ads/providers/soapbox-config.ts
2022-08-01 18:50:46 -05:00

14 lines
387 B
TypeScript

import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import type { AdProvider } from '.';
/** Provides ads from Soapbox Config. */
const SoapboxConfigAdProvider: AdProvider = {
getAds: async(getState) => {
const state = getState();
const soapboxConfig = getSoapboxConfig(state);
return soapboxConfig.ads.toArray();
},
};
export default SoapboxConfigAdProvider;