Skip to content

Commit

Permalink
Merge pull request #331 from newfold-labs/hotfix/live-preview-skeleton
Browse files Browse the repository at this point in the history
Fix count for previews
  • Loading branch information
arunshenoy99 authored Oct 12, 2023
2 parents 51047f4 + ad8ad34 commit eee6ff2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/OnboardingSPA/steps/DesignHomepageMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const StepDesignHomepageMenu = () => {
watch={ homepagePattern }
count={
themeVariations[
currentStep?.patternId
currentStep?.data?.patternId
]?.previewCount
}
callback={ buildHomepagePreviews }
Expand Down
5 changes: 3 additions & 2 deletions src/OnboardingSPA/steps/DesignThemeStyles/Menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ const StepDesignThemeStylesMenu = () => {
<LivePreviewSkeleton
className={ 'theme-styles-menu__list__item' }
count={
themeVariations[ currentStep?.patternId ]
?.previewCount
themeVariations[
currentStep?.data?.patternId
]?.previewCount
}
watch={ pattern && globalStyles }
callback={ buildPreviews }
Expand Down
16 changes: 8 additions & 8 deletions src/OnboardingSPA/steps/SitePages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ const StepSitePages = () => {
const stateToFlowData = ( selectedPages, pages ) => {
return pages !== false
? pages?.reduce( ( newSitePages, sitePage ) => {
return selectedPages.includes( sitePage.slug )
? newSitePages.concat( {
slug: sitePage.slug,
title: sitePage.title,
} )
: newSitePages;
}, [] )
return selectedPages.includes( sitePage.slug )
? newSitePages.concat( {
slug: sitePage.slug,
title: sitePage.title,
} )
: newSitePages;
}, [] )
: undefined;
};

Expand Down Expand Up @@ -170,7 +170,7 @@ const StepSitePages = () => {
className={ 'site-pages__list__item' }
count={
themeVariations[
currentStep?.patternId
currentStep?.data?.patternId
]?.previewCount
}
watch={ sitePages }
Expand Down

0 comments on commit eee6ff2

Please sign in to comment.