@rebilly/framepay-react
Version:
A React wrapper for Rebilly's FramePay offering out-of-the-box support for Redux and other common React features
14 lines (11 loc) • 381 B
text/typescript
import type { FramePay as FramepayApi } from '@rebilly/framepay';
/**
* Just simple wrapper of remote FramePay api
*/
const remoteApi = (): FramepayApi => {
// @ts-expect-error todo setup typescript config correctly
return typeof window !== 'undefined' ? window.Framepay : undefined;
};
export default function getFramepayApi(): FramepayApi {
return remoteApi();
}