22 lines
605 B
JavaScript
22 lines
605 B
JavaScript
// Module ID: 4254
|
|
// Function ID: 4255
|
|
// Name: usePortalState
|
|
// Dependencies: [19, 4251]
|
|
// Exports: usePortalState
|
|
|
|
// Module 4254 (usePortalState)
|
|
import noop from "noop" /* 19 */;
|
|
import createContext from "createContext" /* 4251 */;
|
|
|
|
const useContext = noop.useContext;
|
|
|
|
export const usePortalState = (arg0) => {
|
|
const tmp = useContext(createContext.PortalStateContext);
|
|
if (null === tmp) {
|
|
const _Error = Error;
|
|
error = new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
|
|
throw error;
|
|
} else {
|
|
return tmp[arg0] || [];
|
|
}
|
|
};
|