diff --git a/development/index.tsx b/development/index.tsx index 66f6b75..5152e4d 100644 --- a/development/index.tsx +++ b/development/index.tsx @@ -4,7 +4,8 @@ import * as paystackProps from './types' export { Paystack, - paystackProps + paystackProps } -export default NativeModules.ReactNativePaystackWebviewModule \ No newline at end of file +export default NativeModules.ReactNativePaystackWebviewModule + diff --git a/development/paystack.tsx b/development/paystack.tsx index f790ac4..df0cd68 100644 --- a/development/paystack.tsx +++ b/development/paystack.tsx @@ -5,6 +5,7 @@ import React, { useRef, useImperativeHandle, useCallback, + ReactElement, } from "react"; import { Modal, @@ -51,7 +52,7 @@ const Paystack = forwardRef( metadata, }, ref - ) => { + ): ReactElement => { const [isLoading, setIsLoading] = useState(true); const [showModal, setShowModal] = useState(false); const webViewRef = useRef(null); @@ -68,7 +69,6 @@ const Paystack = forwardRef( })); const generatePaystackParams = () => { - const params = [ buildKeyValueString("key", paystackKey), buildKeyValueString("email", billingEmail), @@ -93,7 +93,6 @@ const Paystack = forwardRef( return params.filter(Boolean).join("\n"); }; - const HTML_CONTENT = paystackHtmlContent(generatePaystackParams()); const handleMessageReceived = useCallback( @@ -171,5 +170,5 @@ const Paystack = forwardRef( ); } ); - + export default Paystack; diff --git a/package.json b/package.json index e69b466..74b361f 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "4.1.1-development", "description": "This package allows you to accept payment in your react native project using paystack ", "homepage": "https://github.com/just1and0/React-Native-Paystack-WebView#readme", - "main": "production/lib/index.js", - "types": "production/lib/types/index.d.ts", + "main": "./production/lib/index.js", + "types": "./production/lib/types/index.js", "author": "Oluwatobi Shokunbi ", "license": "MIT", "scripts": {