| 1 |
import changeHeroSection from '@agent/workflows/theme/tools/change-hero-section'; |
| 2 |
import updateSiteVibes from '@agent/workflows/theme/tools/update-site-vibes'; |
| 3 |
import updateVariation from '@agent/workflows/theme/tools/update-variation'; |
| 4 |
|
| 5 |
export default async ({ |
| 6 |
updatedPageBlocks, |
| 7 |
postId, |
| 8 |
vibeSlug, |
| 9 |
colorAndFontsVariation, |
| 10 |
}) => { |
| 11 |
if (!updatedPageBlocks || !vibeSlug || !colorAndFontsVariation) return; |
| 12 |
|
| 13 |
await Promise.all([ |
| 14 |
changeHeroSection({ updatedPageBlocks, postId }), |
| 15 |
(async () => { |
| 16 |
// The vibe write goes last so it owns the contested leaves. |
| 17 |
await updateVariation({ variation: colorAndFontsVariation }); |
| 18 |
await updateSiteVibes({ selectedVibe: vibeSlug }); |
| 19 |
})(), |
| 20 |
]); |
| 21 |
}; |
| 22 |
|