| 1 |
import domReady from '@wordpress/dom-ready' |
| 2 |
import { render } from '@wordpress/element' |
| 3 |
import { Onboarding } from '@onboarding/Onboarding' |
| 4 |
|
| 5 |
const extendify = Object.assign(document.createElement('div'), { |
| 6 |
id: 'extendify-onboarding-root', |
| 7 |
className: 'extendify-onboarding', |
| 8 |
}) |
| 9 |
document.body.append(extendify) |
| 10 |
domReady(() => { |
| 11 |
const q = new URLSearchParams(window.location.search) |
| 12 |
if (['onboarding'].includes(q.get('extendify'))) { |
| 13 |
render(<Onboarding />, extendify) |
| 14 |
} |
| 15 |
}) |
| 16 |
|