Skip to content

Commit

Permalink
feat: fix import (#203)
Browse files Browse the repository at this point in the history
* feat: general app improvements

* feat: fix export

* fix: fix import

* Update package.json
  • Loading branch information
just1and0 authored Jan 12, 2025
1 parent 5e94d83 commit 4b2877b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 3 additions & 2 deletions development/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import * as paystackProps from './types'

export {
Paystack,
paystackProps
paystackProps
}

export default NativeModules.ReactNativePaystackWebviewModule
export default NativeModules.ReactNativePaystackWebviewModule

7 changes: 3 additions & 4 deletions development/paystack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, {
useRef,
useImperativeHandle,
useCallback,
ReactElement,
} from "react";
import {
Modal,
Expand Down Expand Up @@ -51,7 +52,7 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
metadata,
},
ref
) => {
): ReactElement => {
const [isLoading, setIsLoading] = useState(true);
const [showModal, setShowModal] = useState(false);
const webViewRef = useRef<WebView>(null);
Expand All @@ -68,7 +69,6 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
}));

const generatePaystackParams = () => {

const params = [
buildKeyValueString("key", paystackKey),
buildKeyValueString("email", billingEmail),
Expand All @@ -93,7 +93,6 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
return params.filter(Boolean).join("\n");
};


const HTML_CONTENT = paystackHtmlContent(generatePaystackParams());

const handleMessageReceived = useCallback(
Expand Down Expand Up @@ -171,5 +170,5 @@ const Paystack = forwardRef<PayStackRef, PayStackProps>(
);
}
);

export default Paystack;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ayoshokz@gmail.com>",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit 4b2877b

Please sign in to comment.