Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4745.js (118.4 MB)
33 lines
978 B
TypeScript
33 lines
978 B
TypeScript
// Module ID: 1480
|
|
// Function ID: 1481
|
|
// Name: AppEntryKeyContext
|
|
// Dependencies: [19, 3, 2]
|
|
// Exports: useAppEntryKey
|
|
|
|
// Module 1480 (AppEntryKeyContext)
|
|
import LoggerDefault from "Logger" /* 3 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
let closure_1 = new LoggerDefault("AppEntryKeyContext");
|
|
const main = "main";
|
|
let context = noop.createContext(undefined);
|
|
let c4 = false;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/window/native/AppEntryKeyContext.tsx");
|
|
|
|
export const DEFAULT_APP_ENTRY_KEY = "main";
|
|
export const AppEntryKeyContext = context;
|
|
export const useAppEntryKey = function useAppEntryKey() {
|
|
context = context.useContext(context);
|
|
const items = [context];
|
|
const effect = context.useEffect(() => {
|
|
if (!tmp) {
|
|
c4 = true;
|
|
logger.warn("AppEntryKey context was not provided; falling back to default entry key \"main\".");
|
|
}
|
|
}, items);
|
|
if (context == null) {
|
|
context = main;
|
|
}
|
|
return context;
|
|
};
|