mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Extract todos data to a file
This commit is contained in:
parent
2e3c1f3280
commit
acfdb3d163
2 changed files with 52 additions and 48 deletions
|
@ -11,10 +11,10 @@ import { TITLE_BADGE_POSITIVE } from '../../ReusableComponents/TitleBadge';
|
||||||
import { useMerchantInfo } from '../../../data/common/hooks';
|
import { useMerchantInfo } from '../../../data/common/hooks';
|
||||||
import { STORE_NAME } from '../../../data/common';
|
import { STORE_NAME } from '../../../data/common';
|
||||||
import Features from './TabSettingsElements/Blocks/Features';
|
import Features from './TabSettingsElements/Blocks/Features';
|
||||||
import { updateQueryString } from '../../../utils/navigation';
|
import { todosData } from '../../../data/settings/tab-overview-todos-data';
|
||||||
|
|
||||||
const TabOverview = () => {
|
const TabOverview = () => {
|
||||||
const [ todosData ] = useState( todosDataDefault );
|
//const [ todosData ] = useState( todosDataDefault );
|
||||||
const [ isRefreshing, setIsRefreshing ] = useState( false );
|
const [ isRefreshing, setIsRefreshing ] = useState( false );
|
||||||
|
|
||||||
const { merchant } = useMerchantInfo();
|
const { merchant } = useMerchantInfo();
|
||||||
|
@ -205,50 +205,4 @@ const TabOverview = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const todosDataDefault = [
|
|
||||||
{
|
|
||||||
id: 'enable_fastlane',
|
|
||||||
title: __( 'Enable Fastlane', 'woocommerce-paypal-payments' ),
|
|
||||||
description: __(
|
|
||||||
'Accelerate your guest checkout with Fastlane by PayPal.',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
isCompleted: () => {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
onClick: ( event ) => {
|
|
||||||
event.preventDefault();
|
|
||||||
updateQueryString( { panel: 'payment-methods' } );
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'enable_credit_debit_cards',
|
|
||||||
title: __(
|
|
||||||
'Enable Credit and Debit Cards on your checkout',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
description: __(
|
|
||||||
'Credit and Debit Cards is now available for Blocks checkout pages.',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
isCompleted: () => {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'enable_pay_later_messaging',
|
|
||||||
title: __(
|
|
||||||
'Enable Pay Later messaging',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
description: __(
|
|
||||||
'Show Pay Later messaging to boost conversion rate and increase cart size.',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
isCompleted: () => {
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export default TabOverview;
|
export default TabOverview;
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { selectTab, TAB_IDS } from '../../utils/tabSelector';
|
||||||
|
|
||||||
|
export const todosData = [
|
||||||
|
{
|
||||||
|
id: 'enable_fastlane',
|
||||||
|
title: __( 'Enable Fastlane', 'woocommerce-paypal-payments' ),
|
||||||
|
description: __(
|
||||||
|
'Accelerate your guest checkout with Fastlane by PayPal.',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
isCompleted: () => {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
onClick: () => {
|
||||||
|
selectTab( TAB_IDS.PAYMENT_METHODS, 'ppcp-card-payments-card' );
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'enable_credit_debit_cards',
|
||||||
|
title: __(
|
||||||
|
'Enable Credit and Debit Cards on your checkout',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
description: __(
|
||||||
|
'Credit and Debit Cards is now available for Blocks checkout pages.',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
isCompleted: () => {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
onClick: () => {
|
||||||
|
selectTab( TAB_IDS.PAYMENT_METHODS, 'ppcp-card-payments-card' );
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'enable_pay_later_messaging',
|
||||||
|
title: __(
|
||||||
|
'Enable Pay Later messaging',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
description: __(
|
||||||
|
'Show Pay Later messaging to boost conversion rate and increase cart size.',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
isCompleted: () => {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
Loading…
Add table
Add a link
Reference in a new issue