Skip to content

Commit a6009f2

Browse files
committed
fix: import fix
1 parent af34e2b commit a6009f2

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

development/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as Paystack from './paystack';
1+
import Paystack from './paystack';
22
import * as paystackProps from './types'
33

4-
export default {
4+
export {
55
Paystack,
66
paystackProps
77
}

development/paystack.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import { PayStackProps, PayStackRef } from "./types";
2525
import { styles } from "./style";
2626
import { CLOSE_URL, DEFAULT_ACTIVITY_INDICATOR_COLOR, DEFAULT_AMOUNT, DEFAULT_CURRENCY } from "./utils/constants";
2727

28-
const PaystackComponent = forwardRef<PayStackRef, PayStackProps>(
29-
(
28+
const Paystack: React.ForwardRefRenderFunction<React.ReactNode, PayStackProps> = (
3029
{
3130
paystackKey,
3231
billingEmail,
@@ -52,7 +51,7 @@ const PaystackComponent = forwardRef<PayStackRef, PayStackProps>(
5251
metadata,
5352
},
5453
ref
55-
): ReactElement => {
54+
) => {
5655
const [isLoading, setIsLoading] = useState(true);
5756
const [showModal, setShowModal] = useState(false);
5857
const webViewRef = useRef<WebView>(null);
@@ -169,6 +168,6 @@ const PaystackComponent = forwardRef<PayStackRef, PayStackProps>(
169168
</Modal>
170169
);
171170
}
172-
);
173171

174-
export default PaystackComponent;
172+
173+
export default forwardRef(Paystack);

0 commit comments

Comments
 (0)