diff --git a/build/1.0.0/608.js b/build/1.0.0/608.js index 3a9c847c5..661535672 100644 --- a/build/1.0.0/608.js +++ b/build/1.0.0/608.js @@ -6,4 +6,4 @@ /* translators: 1: Brand 2: Site */ (0,u.__)("Making the keys to your %s Online %s","wp-module-onboarding"),e,(0,p.I)("Site")),subtitle:(0,u.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding")},errorState:{title:(0,u.sprintf)( /* translators: 1: Brand 2: Site */ -(0,u.__)("Making the keys to your %s Online %s","wp-module-onboarding"),e,(0,p.I)("Site")),subtitle:(0,u.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding"),error:(0,u.__)("Uh-oh, something went wrong. Please contact support.","wp-module-onboarding")}}))(h),{updatePluginsStatus:w}=(0,n.useDispatch)(s.h),b=async()=>{const e=await(0,m.qC)(i.Gv);return null!=e&&e.error?i.sG:e.body.status};return(0,a.useEffect)((async()=>{if(l(d[i.Gv]),d[i.Gv]===i.Ck){const e=await b();switch(e){case i.Sr:setTimeout((async()=>{if(await b()!==i.ye)return l(i.sG);window.location.reload()}),i.sr);break;case i.ye:window.location.reload();break;default:d[i.Gv]=e,l(e),w(d)}}}),[d]),(0,a.createElement)(a.Fragment,null,(()=>{switch(r){case i.sG:return(0,a.createElement)(c.V,{title:g.errorState.title,subtitle:g.errorState.subtitle,error:g.errorState.error});case i.ye:return t;default:return(0,a.createElement)(o.Y,{title:g.loader.title,subtitle:g.loader.subtitle})}})())}},9608:function(e,t,r){r.r(t);var a=r(9307),n=(r(5736),r(6974)),o=r(4333),s=r(9818),l=r(6138),i=r(9685),c=r(5791),u=r(1340),d=r(6332),m=r(2200);t.default=()=>{const e=(0,n.TH)(),[t,r]=(0,a.useState)(!1),[p,h]=(0,a.useState)(),g=(0,o.useViewportMatch)("medium"),{currentStep:w,currentData:b}=(0,s.useSelect)((t=>({currentStep:t(i.h).getStepFromPath(e.pathname),currentData:t(i.h).getCurrentOnboardingData()})),[]),{setDrawerActiveView:_,setIsDrawerOpened:f,setSidebarActiveView:v,setIsDrawerSuppressed:E,setIsHeaderNavigationEnabled:S}=(0,s.useDispatch)(i.h);return(0,a.useEffect)((()=>{g&&f(!0),v(m.Jq),E(!1),_(m.qR),S(!0)}),[]),(0,a.useEffect)((()=>{t||(async()=>{const e=await(0,l.C)(w.patternId,!0);if(null!=e&&e.error)return updateThemeStatus(m.vv);h(null==e?void 0:e.body),r(!0)})()}),[t]),(0,a.createElement)(u.U,null,(0,a.createElement)(d.V3,null,(0,a.createElement)(c.Z,{className:"theme-colors-preview"},(0,a.createElement)("div",{className:"theme-colors-preview__title-bar"},(0,a.createElement)("div",{className:"theme-colors-preview__title-bar__browser"},(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}),(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}),(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}))),(0,a.createElement)("div",{className:"theme-colors-preview__live-preview-container"},!p&&(0,a.createElement)(d.i5,{blockGrammer:"",styling:"custom",viewportWidth:1300}),p&&(0,a.createElement)(d.i5,{blockGrammer:p,styling:"custom",viewportWidth:1300})))))}}}]); \ No newline at end of file +(0,u.__)("Making the keys to your %s Online %s","wp-module-onboarding"),e,(0,p.I)("Site")),subtitle:(0,u.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding"),error:(0,u.__)("Uh-oh, something went wrong. Please contact support.","wp-module-onboarding")}}))(h),{updatePluginsStatus:w}=(0,n.useDispatch)(s.h),b=async()=>{const e=await(0,m.qC)(i.Gv);return null!=e&&e.error?i.sG:e.body.status};return(0,a.useEffect)((async()=>{if(l(d[i.Gv]),d[i.Gv]===i.Ck){const e=await b();switch(e){case i.Sr:setTimeout((async()=>{if(await b()!==i.ye)return l(i.sG);window.location.reload()}),i.sr);break;case i.ye:window.location.reload();break;default:d[i.Gv]=e,l(e),w(d)}}}),[d]),(0,a.createElement)(a.Fragment,null,(()=>{switch(r){case i.sG:return(0,a.createElement)(c.V,{title:g.errorState.title,subtitle:g.errorState.subtitle,error:g.errorState.error});case i.ye:return t;default:return(0,a.createElement)(o.Y,{title:g.loader.title,subtitle:g.loader.subtitle})}})())}},9608:function(e,t,r){r.r(t);var a=r(9307),n=r(6974),o=r(4333),s=r(9818),l=r(6138),i=r(9685),c=r(5791),u=r(1340),d=r(6332),m=r(2200);t.default=()=>{const e=(0,n.TH)(),[t,r]=(0,a.useState)(!1),[p,h]=(0,a.useState)(),g=(0,o.useViewportMatch)("medium"),{currentStep:w}=(0,s.useSelect)((t=>({currentStep:t(i.h).getStepFromPath(e.pathname)})),[]),{setDrawerActiveView:b,setIsDrawerOpened:_,setSidebarActiveView:f,setIsDrawerSuppressed:v,setIsHeaderNavigationEnabled:E,updateThemeStatus:S}=(0,s.useDispatch)(i.h);return(0,a.useEffect)((()=>{g&&_(!0),f(m.Jq),v(!1),b(m.qR),E(!0)}),[]),(0,a.useEffect)((()=>{t||(async()=>{const e=await(0,l.C)(w.patternId,!0);if(null!=e&&e.error)return S(m.vv);h(null==e?void 0:e.body),r(!0)})()}),[t]),(0,a.createElement)(u.U,null,(0,a.createElement)(d.V3,null,(0,a.createElement)(c.Z,{className:"theme-colors-preview"},(0,a.createElement)("div",{className:"theme-colors-preview__title-bar"},(0,a.createElement)("div",{className:"theme-colors-preview__title-bar__browser"},(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}),(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}),(0,a.createElement)("span",{className:"theme-colors-preview__title-bar__browser__dot"}))),(0,a.createElement)("div",{className:"theme-colors-preview__live-preview-container"},!p&&(0,a.createElement)(d.i5,{blockGrammer:"",styling:"custom",viewportWidth:1300}),p&&(0,a.createElement)(d.i5,{blockGrammer:p,styling:"custom",viewportWidth:1300})))))}}}]); \ No newline at end of file diff --git a/src/OnboardingSPA/pages/Steps/DesignColors/index.js b/src/OnboardingSPA/pages/Steps/DesignColors/index.js index 49e022e37..9c1d5c8ec 100644 --- a/src/OnboardingSPA/pages/Steps/DesignColors/index.js +++ b/src/OnboardingSPA/pages/Steps/DesignColors/index.js @@ -1,4 +1,3 @@ -import { __ } from '@wordpress/i18n'; import { useLocation } from 'react-router-dom'; import { useViewportMatch } from '@wordpress/compose'; import { useState, useEffect } from '@wordpress/element'; @@ -24,26 +23,21 @@ const StepDesignColors = () => { const [ pattern, setPattern ] = useState(); const isLargeViewport = useViewportMatch( 'medium' ); - const { currentStep, currentData } = useSelect( - ( select ) => { - return { - currentStep: select( nfdOnboardingStore ).getStepFromPath( - location.pathname - ), - currentData: - select( nfdOnboardingStore ).getCurrentOnboardingData(), - }; - }, - [] - ); + const { currentStep } = useSelect( ( select ) => { + return { + currentStep: select( nfdOnboardingStore ).getStepFromPath( + location.pathname + ), + }; + }, [] ); const { setDrawerActiveView, setIsDrawerOpened, setSidebarActiveView, setIsDrawerSuppressed, - setIsHeaderNavigationEnabled - + setIsHeaderNavigationEnabled, + updateThemeStatus, } = useDispatch( nfdOnboardingStore ); useEffect( () => {