@react-native-kakao/navi
Version:
React Native Kakao Navi SDK
42 lines (41 loc) • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
exports.navigateTo = navigateTo;
exports.shareTo = shareTo;
var _reactNative = require("react-native");
const LINKING_ERROR = "The package '@react-native-kakao/navi' doesn't seem to be linked. Make sure: \n\n" + _reactNative.Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
const isTurboModuleEnabled = global.__turboModuleProxy != null;
const Module = isTurboModuleEnabled ? require('./spec/NativeKakaoNavi').default : _reactNative.NativeModules.RNCKakaoNavi;
const Native = Module ? Module : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
function navigateTo({
destination,
option,
viaList,
openWebInstallUrlIfNaviAppNotAvailable
}) {
return Native.navigateOrShareTo(destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable ?? true, false);
}
function shareTo({
destination,
option,
viaList,
openWebInstallUrlIfNaviAppNotAvailable
}) {
return Native.navigateOrShareTo(destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable ?? true, true);
}
const KakaoNavi = {
navigateTo,
shareTo
};
var _default = exports.default = KakaoNavi;
//# sourceMappingURL=index.js.map