mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🎨 Extract magic number to a constant
This commit is contained in:
parent
66dddcff8b
commit
ca4fc6acbd
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,9 @@ import { useSaveSettings } from '../../../../hooks/useSaveSettings';
|
|||
import { CommonHooks } from '../../../../data';
|
||||
import TabBar from '../../../ReusableComponents/TabBar';
|
||||
|
||||
// How long the save confirmation stays visible, in milliseconds.
|
||||
const SAVE_CONFIRMATION_DURATION = 2500;
|
||||
|
||||
const SettingsNavigation = ( {
|
||||
canSave = true,
|
||||
tabs,
|
||||
|
@ -92,7 +95,7 @@ const SaveStateMessage = () => {
|
|||
// Restart the hide-timer, when the message is visible.
|
||||
refHideTimer.current = setTimeout( () => {
|
||||
setShowMessage( false );
|
||||
}, 2500 );
|
||||
}, SAVE_CONFIRMATION_DURATION );
|
||||
}, [ showMessage, isSaving ] );
|
||||
|
||||
if ( ! showMessage ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue