← All changes
|
src/Agent/workflows/theme/components/change-site-design/SelectSiteDesign.jsx
+2
-14
3.2.0
→
trunk
View file →
| @@ -7,9 +7,8 @@ | ||
| 7 | 7 | import { DesignOption } from '@agent/workflows/theme/components/change-site-design/DesignOption'; |
| 8 | 8 | import { fontsOnlyVariation } from '@agent/workflows/theme/components/change-site-design/utils/fontsOnlyVariation'; |
| 9 | 9 | import { removeAnimationClasses } from '@agent/workflows/theme/components/change-site-design/utils/removeAnimationClasses'; |
| 10 | 10 | import { handleSiteImages } from '@auto-launch/fetchers/get-images'; |
| 11 | -import { handleSiteStrings } from '@auto-launch/fetchers/get-strings'; | |
| 12 | 11 | import { useUserSelectionStore } from '@launch/state/user-selections'; |
| 13 | 12 | import { paletteDuotone } from '@shared/lib/palette-preview'; |
| 14 | 13 | import { samplePalettes } from '@shared/lib/palettes'; |
| 15 | 14 | import { safeParseJson } from '@shared/lib/parsing'; |
| @@ -233,14 +232,8 @@ | ||
| 233 | 232 | const storedSiteImages = |
| 234 | 233 | stored?.state?.siteImages ?? launchState?.siteImages?.siteImages ?? []; |
| 235 | 234 | const siteProfile = stored?.state?.siteProfile ?? launchState?.siteProfile; |
| 236 | 235 | |
| 237 | - const storedDescription = | |
| 238 | - description ?? | |
| 239 | - stored?.state?.heroDescription ?? | |
| 240 | - launchState?.siteStrings?.heroDescription ?? | |
| 241 | - null; | |
| 242 | - | |
| 243 | 236 | (async () => { |
| 244 | 237 | const siteImages = await resolveSiteImages({ |
| 245 | 238 | storedSiteImages, |
| 246 | 239 | siteProfile, |
| @@ -245,13 +238,8 @@ | ||
| 245 | 238 | storedSiteImages, |
| 246 | 239 | siteProfile, |
| 247 | 240 | }); |
| 248 | 241 | |
| 249 | - const resolvedDescription = | |
| 250 | - storedDescription || !siteProfile | |
| 251 | - ? storedDescription | |
| 252 | - : (await handleSiteStrings({ siteProfile })).heroDescription; | |
| 253 | - | |
| 254 | 242 | apiFetch({ |
| 255 | 243 | path: '/extendify/v1/agent/site-design-variations', |
| 256 | 244 | method: 'POST', |
| 257 | 245 | data: { |
| @@ -258,9 +246,9 @@ | ||
| 258 | 246 | title, |
| 259 | 247 | images: domImages, |
| 260 | 248 | siteImages, |
| 261 | 249 | postId: context?.postId, |
| 262 | - description: resolvedDescription, | |
| 250 | + description, | |
| 263 | 251 | currentHeroPattern: heroPatternName, |
| 264 | 252 | source: 'change-site-design-workflow', |
| 265 | 253 | cta: { |
| 266 | 254 | label: cta?.textContent, |
| @@ -392,9 +380,9 @@ | ||
| 392 | 380 | ); |
| 393 | 381 | } |
| 394 | 382 | |
| 395 | 383 | return ( |
| 396 | - <div className="mb-4 ms-12 me-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50"> | |
| 384 | + <div className="mb-4 ms-2 me-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50"> | |
| 397 | 385 | <div className="rounded-lg border-b border-gray-300 bg-white"> |
| 398 | 386 | <div className="flex flex-col gap-4 p-3"> |
| 399 | 387 | {currentHeroHtml && ( |
| 400 | 388 | <DesignOption |