mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
🔥 Clean up code
This commit is contained in:
parent
96128ee3e4
commit
209b7a7c88
2 changed files with 1 additions and 25 deletions
|
@ -60,28 +60,6 @@ export const setPersistent = ( prop, value ) => ( {
|
|||
payload: { [ prop ]: value },
|
||||
} );
|
||||
|
||||
/**
|
||||
* Transient. Marks the store as "ready", i.e., fully initialized.
|
||||
*
|
||||
* @param {boolean} isReady
|
||||
* @return {Action} The action.
|
||||
*/
|
||||
export const setIsReady = ( isReady ) => ( {
|
||||
type: ACTION_TYPES.SET_TRANSIENT,
|
||||
payload: { isReady },
|
||||
} );
|
||||
|
||||
/**
|
||||
* Persistent.
|
||||
*
|
||||
* @param {string} shape
|
||||
* @return {Action} The action.
|
||||
*/
|
||||
export const setShape = ( shape ) => ( {
|
||||
type: ACTION_TYPES.SET_PERSISTENT,
|
||||
payload: { shape },
|
||||
} );
|
||||
|
||||
/**
|
||||
* Side effect. Triggers the persistence of store data to the server.
|
||||
*
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useCallback, useState } from '@wordpress/element'; // Temporary
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
import { useDispatch } from '@wordpress/data';
|
||||
|
||||
import { createHooksForStore } from '../utils';
|
||||
import { STORE_NAME } from './constants';
|
||||
|
@ -37,8 +37,6 @@ const useHooks = () => {
|
|||
return {
|
||||
persist,
|
||||
isReady,
|
||||
shape,
|
||||
setShape,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue