| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | import domReady from '@wordpress/dom-ready'; |
| 2 | 2 | import '@shared/shared.css'; |
| 3 | 3 | import { EditPageToolTip } from '@shared/components/EditPageToolTip'; |
| 4 | 4 | import '@shared/lib/api-fetch'; |
| 5 | +import { ProductAccountActivation } from '@shared/components/ProductAccountActivation/ProductAccountActivation'; | |
| 5 | 6 | import { render } from '@shared/lib/dom'; |
| 6 | 7 | import { preFetchImages as preFetchUnsplashImages } from '@shared/lib/unsplash'; |
| 7 | 8 | |
| 8 | 9 | const showAIAgents = window.extSharedData.showAIAgents; |
| @@ -18,9 +19,21 @@ | ||
| 18 | 19 | |
| 19 | 20 | preFetchUnsplashImages(); |
| 20 | 21 | |
| 21 | 22 | const urlParams = new URLSearchParams(window.location.search); |
| 23 | + | |
| 22 | 24 | if (!urlParams.has('extendify-launch-success')) return; |
| 25 | + | |
| 26 | + if (window.extSharedData?.showProductActivation?.length) { | |
| 27 | + const container = Object.assign(document.createElement('div'), { | |
| 28 | + id: 'extendify-product-activation-container', | |
| 29 | + }); | |
| 30 | + | |
| 31 | + document.body.appendChild(container); | |
| 32 | + | |
| 33 | + render(<ProductAccountActivation />, container); | |
| 34 | + } | |
| 35 | + | |
| 23 | 36 | const currentUrl = new URL(window.location.href); |
| 24 | 37 | // Remove the query param so it doesn't show again |
| 25 | 38 | urlParams.delete('extendify-launch-success'); |
| 26 | 39 | const newUrl = `${currentUrl.origin}${currentUrl.pathname}`; |