Skip to content

Commit

Permalink
Revert "Revert "Added State Handler""
Browse files Browse the repository at this point in the history
This reverts commit 3f80b38.
  • Loading branch information
officiallygod committed Dec 26, 2022
1 parent 3f80b38 commit 2e9bf52
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import { __, sprintf } from '@wordpress/i18n';
import { translations } from '../../../../../../utils/locales/translations';
import { institution } from '@wordpress/icons';

const getContents = ( brandName, techSupportLink, fullServiceCreativeTeamLink ) => {
const getContents = (
brandName,
techSupportLink,
fullServiceCreativeTeamLink
) => {
return {
introduction: {
heading: __( 'Tax Info', 'wp-module-onboarding' ),
subheading: sprintf(
/* translators: 1: Site 2: Brand 3: Site */
__(
'A %s that does taxes in one click. That’s pretty novel.'
),
__( 'A %s that does taxes in one click. That’s pretty novel.' ),
translations( 'site' ),
brandName,
translations( 'Site' )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,24 @@ const StepIntroPanel = lazy( () =>
);

const LearnMore = () => {
const { brandName, techSupportLink, fullServiceCreativeTeamLink } = useSelect( ( select ) => {
return {
brandName: select( nfdOnboardingStore ).getNewfoldBrandName(),
techSupportLink: select( nfdOnboardingStore ).getTechSupportUrl(),
fullServiceCreativeTeamLink: select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl(),
};
} );
const { brandName, techSupportLink, fullServiceCreativeTeamLink } =
useSelect( ( select ) => {
return {
brandName: select( nfdOnboardingStore ).getNewfoldBrandName(),
techSupportLink:
select( nfdOnboardingStore ).getTechSupportUrl(),
fullServiceCreativeTeamLink:
select(
nfdOnboardingStore
).getfullServiceCreativeTeamUrl(),
};
} );

const content = getContents( brandName, techSupportLink, fullServiceCreativeTeamLink );
const content = getContents(
brandName,
techSupportLink,
fullServiceCreativeTeamLink
);

return (
<div className="nfd-onboarding-sidebar-learn-more__ecommerce-tax-info">
Expand All @@ -61,7 +70,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.open( content.help.fullService.link, '_blank') )
window.open( content.help.fullService.link, '_blank' )
}
/>
<SupportLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { translations } from '../../../../../../utils/locales/translations';
import { home } from '@wordpress/icons';

const getContents = ( techSupportLink, fullServiceCreativeTeamLink ) => {

return {
introduction: {
heading: __( 'WordPress Experience', 'wp-module-onboarding' ),
Expand All @@ -24,10 +23,7 @@ const getContents = ( techSupportLink, fullServiceCreativeTeamLink ) => {
information: {
headingWithDescriptions: [
{
heading: __(
'Why we ask',
'wp-module-onboarding'
),
heading: __( 'Why we ask', 'wp-module-onboarding' ),
description: __(
`We use this to help offer the best WordPress setup, features and suggestions for your site.`,
'wp-module-onboarding'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ const StepIntroPanel = lazy( () =>
);

const LearnMore = () => {

const { techSupportLink, fullServiceCreativeTeamLink } = useSelect( ( select ) => {
return {
techSupportLink: select( nfdOnboardingStore ).getTechSupportUrl(),
fullServiceCreativeTeamLink: select( nfdOnboardingStore ).getfullServiceCreativeTeamUrl(),
};
} );
const { techSupportLink, fullServiceCreativeTeamLink } = useSelect(
( select ) => {
return {
techSupportLink:
select( nfdOnboardingStore ).getTechSupportUrl(),
fullServiceCreativeTeamLink:
select(
nfdOnboardingStore
).getfullServiceCreativeTeamUrl(),
};
}
);

const content = getContents( techSupportLink, fullServiceCreativeTeamLink );

Expand All @@ -61,7 +66,7 @@ const LearnMore = () => {
<ButtonWhite
text={ content.help.fullService.text }
onClick={ () =>
( window.open( content.help.fullService.link, '_blank') )
window.open( content.help.fullService.link, '_blank' )
}
/>
<SupportLink
Expand Down

0 comments on commit 2e9bf52

Please sign in to comment.