Banners Blaze plugin
Plugin where we create and load content to the Portal in order to load the wallpaper banner at the top level of the app.
Directly in the frontend, we include the Portal component, it only has one prop that is required to modifiy another div's classname.
<Portal
setModifier={value => {
if ((!value && wallpaperBannerModifier) || (value && !wallpaperBannerModifier)) {
this.setState({ wallpaperBannerModifier: value });
}
}}
/>
Components
Portal
Checks if there is data related to the wallpaper banner in the local state (using the GET_PORTAL_COMPONENT query)
If there is, render the PortalContent.
PortalContent
Get banner data from local state (adunit etc) and creates a portal in the main app's container in order to render the wallpaper banner.
Services
Queries to read form the local state in order to check if there is any wallpaper banner set on page (and if yes, its data).