@olo/pay-react-native
Version:
Olo Pay React Native SDK
16 lines • 786 B
JavaScript
// Copyright © 2022 Olo Inc. All rights reserved.
// This software is made available under the Olo Pay SDK License (See LICENSE.md file)
import { NativeModules, Platform } from 'react-native';
const LINKING_ERROR = `The package '@olo/pay-react-native' 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 managed workflow\n';
const OlopaysdkReactNative = NativeModules.OlopaysdkReactNative ? NativeModules.OlopaysdkReactNative : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
export default function useOloPayNativeModule() {
return OlopaysdkReactNative;
}
//# sourceMappingURL=useOloPayNativeModule.js.map