REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.06 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/hoc/with-notice.js
Text
Base64
/* eslint-disable @typescript-eslint/explicit-function-return-type */ import { connect } from 'react-redux'; import { addNotice } from '../store/actions/add-notice.js'; /** * Additional props which are passed to your component * @alias AddNoticeProps * @memberof withNotice */ const mapDispatchToProps = dispatch => ({ addNotice: notice => dispatch(addNotice(notice)) }); /** * Higher Order Component which allows you to post notice messages from your components * * It gives you the additional prop: `addNotice(noticeMessage)` taking {@link NoticeMessage}. * * ```javascript * import { withNotice } from 'adminjs/core' * * const MY_MESSAGE = { * message: 'I am toast message', * type: 'success', * } * const MyCustomComponent = ({ addNotice }) => { * return ( * <a onClick={() => addNotice(MY_MESSAGE)}>Click Me</a> * ) * } * export default withNotice(MyCustomComponent) * ``` * * @component * @subcategory HOC */ const withNotice = Component => connect(null, mapDispatchToProps)(Component); export { withNotice as default, withNotice };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
allow-override.js
1.35 KB
lrw-r--r--
2026-02-28 00:29:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
104 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
with-no-ssr.js
944 B
lrw-r--r--
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
with-notice.js
1.06 KB
lrw-r--r--
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).