2026-07-23 10:11:24 +00:00
|
|
|
// Module ID: 4007
|
2026-07-24 07:16:23 +00:00
|
|
|
// Function ID: 33271
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: usePortalState
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [31, 4004]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: usePortalState
|
|
|
|
|
|
2026-07-23 10:11:24 +00:00
|
|
|
// Module 4007 (usePortalState)
|
|
|
|
|
import { useContext } from "result";
|
2026-07-21 06:55:02 +00:00
|
|
|
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const usePortalState = function usePortalState(name) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const tmp = useContext(require(4004) /* createContext */.PortalStateContext);
|
2026-07-20 16:05:17 +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[name] || [];
|
|
|
|
|
}
|
|
|
|
|
};
|