Skip to content

Commit

Permalink
Move icons to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
inpsyde-maticluznar committed Dec 23, 2024
1 parent eeb0c63 commit a78e11c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { default as openSignup } from './Icons/open-signup';
export const NOTIFICATION_SUCCESS = '✔️';
export const NOTIFICATION_ERROR = '❌';
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { ButtonSettingsBlock } from '../../../../../ReusableComponents/SettingsB
import { __ } from '@wordpress/i18n';
import { useDispatch } from '@wordpress/data';
import { store as noticesStore } from '@wordpress/notices';
import {
NOTIFICATION_ERROR,
NOTIFICATION_SUCCESS,
} from '../../../../../ReusableComponents/Icons';

const ResubscribeBlock = () => {
const { createSuccessNotice, createErrorNotice } =
Expand All @@ -24,7 +28,7 @@ const ResubscribeBlock = () => {
'woocommerce-paypal-payments'
),
{
icon: '❌',
icon: NOTIFICATION_ERROR,
}
);
return;
Expand All @@ -37,7 +41,7 @@ const ResubscribeBlock = () => {
'woocommerce-paypal-payments'
),
{
icon: '✔️',
icon: NOTIFICATION_SUCCESS,
}
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { ButtonSettingsBlock } from '../../../../../ReusableComponents/SettingsB
import { useDispatch } from '@wordpress/data';
import { store as noticesStore } from '@wordpress/notices';
import { CommonHooks } from '../../../../../../data';
import {
NOTIFICATION_ERROR,
NOTIFICATION_SUCCESS,
} from '../../../../../ReusableComponents/Icons';

const SimulationBlock = () => {
const {
Expand Down Expand Up @@ -52,7 +56,7 @@ const SimulationBlock = () => {
'woocommerce-paypal-payments'
),
{
icon: '❌',
icon: NOTIFICATION_ERROR,
}
);
return;
Expand All @@ -78,7 +82,7 @@ const SimulationBlock = () => {
'woocommerce-paypal-payments'
),
{
icon: '✔️',
icon: NOTIFICATION_SUCCESS,
}
);
stopSimulation();
Expand All @@ -97,7 +101,7 @@ const SimulationBlock = () => {
'woocommerce-paypal-payments'
),
{
icon: '❌',
icon: NOTIFICATION_ERROR,
}
);
};
Expand Down

0 comments on commit a78e11c

Please sign in to comment.