Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Error when clicking "simulate a month passing": "props.transfers.map is not a function" #34

Open
phoenixy1 opened this issue Nov 30, 2022 · 1 comment
Assignees

Comments

@phoenixy1
Copy link
Collaborator

Whenever I click "simulate a month passing" I reliably get this error.

TypeError: props.transfers.map is not a function
UserTransfers
src/components/UserTransfers.tsx:9
6 | }
7 |
8 | const UserTransfers: React.FC = (props: Props) => {

9 | const tableRows =
10 | props.transfers == null
11 | ? null
12 | : props.transfers.map((transfer, index) => {
View compiled
▶ 17 stack frames were collapsed.
initiateTransfer
src/components/TransferForm.tsx:56
53 | itemId,
54 | monthlyPayment
55 | );
56 | props.setTransfers(transfersResponse.data);
| ^ 57 | const paymentsResponse = await addPayment(props.userId, monthlyPayment);
58 | props.setPayments(paymentsResponse.data[0]);
59 | setError(null);

@danielwangai
Copy link

Getting the same error. Any update on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants