[CYS] Temporarily remove the survey button (#41781)
This commit is contained in:
commit
d9ca827083
|
@ -96,6 +96,7 @@ export const Layout = () => {
|
||||||
hasCompleteSurvey={
|
hasCompleteSurvey={
|
||||||
!! context?.transitionalScreen?.hasCompleteSurvey
|
!! context?.transitionalScreen?.hasCompleteSurvey
|
||||||
}
|
}
|
||||||
|
aiOnline={ !! context?.aiOnline }
|
||||||
/>
|
/>
|
||||||
</EntityProvider>
|
</EntityProvider>
|
||||||
</EntityProvider>
|
</EntityProvider>
|
||||||
|
|
|
@ -39,12 +39,14 @@ export const Transitional = ( {
|
||||||
hasCompleteSurvey,
|
hasCompleteSurvey,
|
||||||
isSurveyOpen,
|
isSurveyOpen,
|
||||||
setSurveyOpen,
|
setSurveyOpen,
|
||||||
|
aiOnline,
|
||||||
}: {
|
}: {
|
||||||
editor: React.ReactNode;
|
editor: React.ReactNode;
|
||||||
sendEvent: ( event: events ) => void;
|
sendEvent: ( event: events ) => void;
|
||||||
hasCompleteSurvey: boolean;
|
hasCompleteSurvey: boolean;
|
||||||
isSurveyOpen: boolean;
|
isSurveyOpen: boolean;
|
||||||
setSurveyOpen: ( isOpen: boolean ) => void;
|
setSurveyOpen: ( isOpen: boolean ) => void;
|
||||||
|
aiOnline: boolean;
|
||||||
} ) => {
|
} ) => {
|
||||||
const homeUrl: string = getSetting( 'homeUrl', '' );
|
const homeUrl: string = getSetting( 'homeUrl', '' );
|
||||||
const isEditorLoading = useIsSiteEditorLoading();
|
const isEditorLoading = useIsSiteEditorLoading();
|
||||||
|
@ -54,7 +56,7 @@ export const Transitional = ( {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="woocommerce-customize-store__transitional">
|
<div className="woocommerce-customize-store__transitional">
|
||||||
{ isSurveyOpen && (
|
{ isSurveyOpen && aiOnline && (
|
||||||
<Modal
|
<Modal
|
||||||
title={ __( 'Share feedback', 'woocommerce' ) }
|
title={ __( 'Share feedback', 'woocommerce' ) }
|
||||||
onRequestClose={ () => closeSurvey() }
|
onRequestClose={ () => closeSurvey() }
|
||||||
|
@ -95,7 +97,7 @@ export const Transitional = ( {
|
||||||
<div className="woocommerce-customize-store__transitional-main-actions">
|
<div className="woocommerce-customize-store__transitional-main-actions">
|
||||||
<WooCYSSecondaryButtonSlot />
|
<WooCYSSecondaryButtonSlot />
|
||||||
|
|
||||||
{ ! hasCompleteSurvey && (
|
{ ! hasCompleteSurvey && aiOnline && (
|
||||||
<Button
|
<Button
|
||||||
className="woocommerce-customize-store__transitional-preview-button"
|
className="woocommerce-customize-store__transitional-preview-button"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: update
|
||||||
|
|
||||||
|
Hide the "Share feedback" button from the CYS preview step when AI is not available.
|
Loading…
Reference in New Issue