UNPKG

@react-native-kakao/navi

Version:
34 lines 1.18 kB
import { NativeModules, Platform } from 'react-native'; const LINKING_ERROR = "The package '@react-native-kakao/navi' doesn't seem to be linked. Make sure: \n\n" + 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 : NativeModules.RNCKakaoNavi; const Native = Module ? Module : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); export function navigateTo({ destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable }) { return Native.navigateOrShareTo(destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable ?? true, false); } export function shareTo({ destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable }) { return Native.navigateOrShareTo(destination, option, viaList, openWebInstallUrlIfNaviAppNotAvailable ?? true, true); } const KakaoNavi = { navigateTo, shareTo }; export default KakaoNavi; //# sourceMappingURL=index.js.map