24 lines
719 B
TypeScript
24 lines
719 B
TypeScript
// Metro module 1477 (f1478).
|
|
import { createContext, useContext, useEffect } from "react";
|
|
import Logger from "../../debug/Logger";
|
|
let c1193_1 = new Logger("AppEntryKeyContext");
|
|
let c1193_2 = "main";
|
|
const context = createContext(void 0);
|
|
let c1193_4 = false;
|
|
export const DEFAULT_APP_ENTRY_KEY = "main";
|
|
export { context as AppEntryKeyContext };
|
|
export function useAppEntryKey() {
|
|
let r7 = useContext(context);
|
|
const context2 = r7;
|
|
useEffect(() => {
|
|
if (!(context2 !== void 0 || c1193_4)) {
|
|
c1193_4 = true;
|
|
c1193_1.warn("AppEntryKey context was not provided; falling back to default entry key \"main\".");
|
|
}
|
|
}, [context2]);
|
|
if (context2 == null) {
|
|
r7 = c1193_2;
|
|
}
|
|
return r7;
|
|
}
|