decord/source/modules/window/native/AppEntryKeyContext.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

34 lines
1 KiB
TypeScript

// Module ID: 1480
// Function ID: 1481
// Name: context
// Dependencies: [19, 3, 2]
// Exports: useAppEntryKey
// Module 1480 (context)
import timestampDefault from "timestamp" /* 3 */;
import importAllResult from "noop" /* 19 */;
let c0 = importAllResult;
let closure_1 = new timestampDefault("AppEntryKeyContext");
const main = "main";
let context = importAllResult.createContext(undefined);
let c4 = false;
const tmp2 = new timestampDefault("AppEntryKeyContext");
const result = require("set").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;
closure_1_1.warn("AppEntryKey context was not provided; falling back to default entry key \"main\".");
}
}, items);
if (context == null) {
context = main;
}
return context;
};