decord/source/4132_usePortalState.js

21 lines
542 B
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 4132
// Function ID: 4133
2026-07-29 08:29:29 +00:00
// Name: usePortalState
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 4129]
2026-07-29 08:29:29 +00:00
// Exports: usePortalState
2026-08-05 07:35:12 +00:00
// Module 4132 (usePortalState)
2026-07-29 08:29:29 +00:00
import { useContext } from "noop";
export const usePortalState = (arg0) => {
2026-08-05 07:35:12 +00:00
const tmp = useContext(require(4129) /* createContext */.PortalStateContext);
2026-07-29 08:29:29 +00:00
if (null === tmp) {
const _Error = Error;
const error = new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
throw error;
} else {
return tmp[arg0] || [];
}
};