Skip to content

Commit 4b2877b

Browse files
authored
feat: fix import (#203)
* feat: general app improvements * feat: fix export * fix: fix import * Update package.json
1 parent 5e94d83 commit 4b2877b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

development/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import * as paystackProps from './types'
44

55
export {
66
Paystack,
7-
paystackProps
7+
paystackProps
88
}
99

10-
export default NativeModules.ReactNativePaystackWebviewModule
10+
export default NativeModules.ReactNativePaystackWebviewModule
11+

development/paystack.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import React, {
55
useRef,
66
useImperativeHandle,
77
useCallback,
8+
ReactElement,
89
} from "react";
910
import {
1011
Modal,
@@ -51,7 +52,7 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
5152
metadata,
5253
},
5354
ref
54-
) => {
55+
): ReactElement => {
5556
const [isLoading, setIsLoading] = useState(true);
5657
const [showModal, setShowModal] = useState(false);
5758
const webViewRef = useRef<WebView>(null);
@@ -68,7 +69,6 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
6869
}));
6970

7071
const generatePaystackParams = () => {
71-
7272
const params = [
7373
buildKeyValueString("key", paystackKey),
7474
buildKeyValueString("email", billingEmail),
@@ -93,7 +93,6 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
9393
return params.filter(Boolean).join("\n");
9494
};
9595

96-
9796
const HTML_CONTENT = paystackHtmlContent(generatePaystackParams());
9897

9998
const handleMessageReceived = useCallback(
@@ -171,5 +170,5 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
171170
);
172171
}
173172
);
174-
173+
175174
export default Paystack;

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "4.1.1-development",
44
"description": "This package allows you to accept payment in your react native project using paystack ",
55
"homepage": "https://github.com/just1and0/React-Native-Paystack-WebView#readme",
6-
"main": "production/lib/index.js",
7-
"types": "production/lib/types/index.d.ts",
6+
"main": "./production/lib/index.js",
7+
"types": "./production/lib/types/index.js",
88
"author": "Oluwatobi Shokunbi <[email protected]>",
99
"license": "MIT",
1010
"scripts": {

0 commit comments

Comments
 (0)