Files
discord-decomp/sources/by-id/module-01510-SingleNavigatorContext.jsx
T
2026-07-28 01:06:53 +03:00

50 lines
2.9 KiB
React

/* Metro module 1510; source: unknown; dependencies: [31, 33] */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun17184(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1637:6, offset: 0x00e65e12, size: 118 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
value = value.createContext(undefined);
exports.default = EnsureSingleNavigator;
exports.SingleNavigatorContext = value;
function EnsureSingleNavigator({children}) { // fn#17185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1637:156, offset: 0x00e65e88, size: 84 bytes, params: 2, frame: 15
const binding = env0_0;
var env0_0 = binding.useRef();
const value2 = binding.useMemo(function() {
return {register: _fun17187, unregister: _fun17188};
}, []);
const Provider = env0_2.Provider;
return (
<Provider value={value2}>
{children}
</Provider>
);
function _fun17186() { // fn#17186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1637:233, offset: 0x00e65edc, size: 26 bytes, params: 1, frame: 3
return {register: register_17187, unregister: unregister_17188};
function register_17187(a0) { // fn#17187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1637:260, offset: 0x00e65ef6, size: 73 bytes, params: 2, frame: 13
const value = environment.__proto__;
const current = env1_0.current;
if (current !== undefined) {
if (a0 !== current) {
throw new global.Error('Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.');
}
}
env1_0.current = a0;
}
function unregister_17188(a0) { // fn#17188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1637:652, offset: 0x00e65f3f, size: 35 bytes, params: 2, frame: 3
if (a0 === env1_0.current) {
env1_0.current = undefined;
}
}
}
}
}
global.__d(_fun17184, 1510, [31, 33]) /* metro module 1510, dependencies: [31, 33] */;