REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.32 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/hooks/use-action/use-action.js
Text
Base64
import { useNavigate, useLocation } from 'react-router'; import { buildActionCallApiTrigger, buildActionClickHandler } from '../../interfaces/index.js'; import { actionHref } from '../../interfaces/action/action-href.js'; import { useActionResponseHandler } from './use-action-response-handler.js'; import { useTranslation } from '../use-translation.js'; import { useModal } from '../use-modal.js'; /** * @load ./use-action.doc.md * @subcategory Hooks * * @param {ActionJSON} action action object * @param {ActionParams} params * @param {ActionCallCallback} onActionCall - callback triggered when action is performed * @return {UseActionResult} * @class * @hideconstructor */ export function useAction(action, params, onActionCall) { const navigate = useNavigate(); const location = useLocation(); const translateFunctions = useTranslation(); const modalFunctions = useModal(); const actionResponseHandler = useActionResponseHandler(onActionCall); const href = actionHref(action, params); const callApi = buildActionCallApiTrigger({ action, params, actionResponseHandler }); const handleClick = buildActionClickHandler({ action, params, actionResponseHandler, navigate, translateFunctions, modalFunctions, location }); return { href, callApi, handleClick }; }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.js
121 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
use-action-response-handler.js
774 B
lrw-r--r--
2026-02-28 00:31:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-action.doc.md
550 B
lrw-r--r--
2026-02-28 00:31:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-action.js
1.32 KB
lrw-r--r--
2026-02-28 00:31:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-action.types.js
10 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
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).