PHP 8.2.30
Preview: use-resource.js Size: 460 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/hooks/use-resource/use-resource.js

import { useSelector } from 'react-redux';
/**
 * @load ./use-resource.doc.md
 * @subcategory Hooks
 * @class
 * @hideconstructor
 * @bundle
 * @param {string} resourceId    Id of a resource you want to get
 */
const useResource = resourceId => {
  const resources = useSelector(state => state.resources);
  const foundResource = resources.find(resource => resource.id === resourceId);
  return foundResource;
};
export { useResource as default, useResource };

Directory Contents

Dirs: 0 × Files: 3

Name Size Perms Modified Actions
34 B lrw-r--r-- 2026-02-28 00:31:44
Edit Download
356 B lrw-r--r-- 2026-02-28 00:31:56
Edit Download
460 B lrw-r--r-- 2026-02-28 00:31:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).