52 | {user.liabilitiesConnected === PlaidConnectStatus.Unknown ? (
53 | Getting connection status
54 | ) : user.liabilitiesConnected === PlaidConnectStatus.Connected ? (
55 | <>
56 |
57 | >
58 | ) : (
59 | <>
60 |
61 | Outstanding loans
62 |
63 | Tell us a little about your current loans
64 |
68 | >
69 | )}
70 | {user.incomeConnected === PlaidConnectStatus.Unknown ? (
71 | Getting income status
72 | ) : user.incomeConnected === PlaidConnectStatus.Connected ? (
73 |
74 |
75 |
76 |
77 |
78 | ) : (
79 | <>
80 |
81 | Sources of Income
82 |
83 | Tell us about your sources of income!
84 |
85 |
90 |
95 |
96 | >
97 | )}
98 |
99 | );
100 | };
101 |
102 | export default UserStatus;
103 |
--------------------------------------------------------------------------------
/client/src/components/BankIncome.tsx:
--------------------------------------------------------------------------------
1 | import { useCallback, useContext, useEffect, useState } from "react";
2 | import { UserContext } from "./UserContext";
3 | import LinkLoader, { IncomeType } from "./LinkLoader";
4 | import { Box, Flex, Heading, VStack } from "@chakra-ui/layout";
5 |
6 | interface BankData {
7 | bank_name: string;
8 | total_amount: number;
9 | transaction_count: number;
10 | description: number;
11 | income_id: string;
12 | }
13 |
14 | /**
15 | * Retrieves any income data form the user's bank and displays it in a
16 | * somewhat user-friendly format
17 | */
18 | const BankIncome = () => {
19 | const [bankIncome, setBankIncome] = useState(Array