| 1 |
import { handleDesign } from '@auto-launch/fetchers/get-design'; |
| 2 |
import { applyDesign, chooseLogo } from '@auto-launch/functions/design'; |
| 3 |
import { LaunchPage } from '@auto-launch/LaunchPage'; |
| 4 |
import { chooseTemplates } from '@auto-launch/templates'; |
| 5 |
import { createRoot } from '@wordpress/element'; |
| 6 |
import '@auto-launch/auto-launch.css'; |
| 7 |
|
| 8 |
requestAnimationFrame(async () => { |
| 9 |
const launch = document.getElementById('extendify-auto-launch-page'); |
| 10 |
if (!launch) return; |
| 11 |
// Before the first paint, or the partner's own colours show and then swap. |
| 12 |
const design = await handleDesign(); |
| 13 |
chooseTemplates(design.templates); |
| 14 |
chooseLogo(design.logo); |
| 15 |
applyDesign(launch, design); |
| 16 |
const root = createRoot(launch); |
| 17 |
root.render(<LaunchPage />); |
| 18 |
}); |
| 19 |
|