one
Version:
One is a new React Framework that makes Vite serve both native and web.
30 lines (29 loc) • 1.08 kB
JavaScript
import { Protected } from "../views/Protected.mjs";
import { withLayoutContext } from "./withLayoutContext.mjs";
let NativeBottomTabNavigator = null;
try {
const mod = require("@bottom-tabs/react-navigation");
NativeBottomTabNavigator = mod.createNativeBottomTabNavigator().Navigator;
} catch {}
function createNativeTabs() {
if (!NativeBottomTabNavigator) {
throw new Error("NativeTabs requires @bottom-tabs/react-navigation and react-native-bottom-tabs.\nInstall: npx expo install @bottom-tabs/react-navigation react-native-bottom-tabs");
}
return Object.assign(withLayoutContext(NativeBottomTabNavigator), {
Protected
});
}
let _nativeTabs = null;
const NativeTabs = new Proxy({}, {
get(_, prop) {
if (!_nativeTabs) _nativeTabs = createNativeTabs();
return _nativeTabs[prop];
},
apply(_, thisArg, args) {
if (!_nativeTabs) _nativeTabs = createNativeTabs();
return _nativeTabs.apply(thisArg, args);
}
});
var NativeTabs_default = NativeTabs;
export { NativeTabs, NativeTabs_default as default };
//# sourceMappingURL=NativeTabs.mjs.map