File Editor
Directories:
.. (Back)
AutoComplete
Captcha
DataTable
DynamicDataTable
EventLog
FileChangeDetection
GeoBlockList
Host
LearningMode
License
LimitLoginAttempts
MixedContentScan
RiskConfiguration
TwoFA
firewall
Files:
Button.js
CheckboxControl.js
Field.js
FieldsData.js
FilterData.js
Help.js
Notices.js
Password.js
PermissionsPolicy.js
PostDropDown.js
PremiumOverlay.js
RolesDropDown.js
SelectControl.js
Settings.js
SettingsGroup.js
Support.js
Create New File
Create
Edit File: Notices.js
/** * Notice after saving was successfull */ import { SnackbarList } from '@wordpress/components'; import { useDispatch, useSelect, } from '@wordpress/data'; import { store as noticesStore } from '@wordpress/notices'; const Notices = () => { const notices = useSelect( ( select ) => select( noticesStore ) .getNotices() .filter( ( notice ) => notice.type === 'snackbar' ), [] ); if ( typeof notices === 'undefined' ) { return (<></>) } const { removeNotice } = useDispatch( noticesStore ); return ( <SnackbarList className="edit-site-notices" notices={ notices } onRemove={ removeNotice } /> ); }; export default Notices;
Save Changes
Rename File
Rename