Skip to content

Commit

Permalink
Fix/widget display issues (#3)
Browse files Browse the repository at this point in the history
* fix: dependencies changed & imports added

* chore: callback's setter logic changed (setState removed)

* chore: (import syntax changed for types)

* chore: ci changed

* chore: ci changed

* chore: ci changed
  • Loading branch information
FulbertoDev authored Mar 22, 2024
1 parent d3a6200 commit 4eb11df
Show file tree
Hide file tree
Showing 9 changed files with 24,347 additions and 2,275 deletions.
7 changes: 4 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ runs:
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --cwd example --frozen-lockfile
yarn install --frozen-lockfile
run: yarn install --immutable
#run: |
# yarn install --cwd example --frozen-lockfile
# yarn install --frozen-lockfile
shell: bash
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Enable corepack
run: corepack enable

- name: Checkout
uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ interface IData {
direct?: string;
split?: string;
partnerId?: string;
reason: string;
}
interface ListenerData {
transactionId: string;
Expand Down
28 changes: 16 additions & 12 deletions example/src/TestComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import { Button, View } from "react-native";
import { useKkiapay } from "src/kkiapay";

import { Button, View } from 'react-native';
import { useKkiapay } from 'src/kkiapay';
import React from 'react';

export default function TestComponent() {
const { openKkiapayWidget } = useKkiapay();

const {openKkiapayWidget} = useKkiapay();

const openWidget = () => {
openKkiapayWidget({amount: 100, key: '3425dc6035d711eca8f5b92f2997955b', sandbox: true })
}
const openWidget = () => {
openKkiapayWidget({
amount: 100,
key: '3425dc6035d711eca8f5b92f2997955b',
sandbox: true,
reason: 'Payment',
});
};

return (
<View>
<Button title="Pay now" onPress={openWidget}>
</Vie>
)
}
<Button title="Pay now" onPress={openWidget} />
</View>
);
}
Loading

0 comments on commit 4eb11df

Please sign in to comment.