- {!connected && (
-
{LABELS.DASHBOARD_INFO}
+ {!connected && (
+
+
+ {LABELS.DASHBOARD_INFO}
+
)}
{connected &&
userDeposits.length === 0 &&
userObligations.length === 0 && (
-
{LABELS.NO_LOANS_NO_DEPOSITS}
+
+
+ {LABELS.NO_LOANS_NO_DEPOSITS}
+
)}
- {userDeposits.length > 0 && (
-
-
{LABELS.DASHBOARD_TITLE_DEPOSITS}
-
-
{LABELS.TABLE_TITLE_ASSET}
-
{LABELS.TABLE_TITLE_DEPOSIT_BALANCE}
-
{LABELS.TABLE_TITLE_APY}
-
{LABELS.TABLE_TITLE_ACTION}
-
- {userDeposits.map((deposit) => (
-
- ))}
-
- )}
- {userObligations.length > 0 && (
-
-
{LABELS.DASHBOARD_TITLE_LOANS}
-
-
{LABELS.TABLE_TITLE_ASSET}
-
{LABELS.TABLE_TITLE_YOUR_LOAN_BALANCE}
-
{LABELS.TABLE_TITLE_COLLATERAL_BALANCE}
-
{LABELS.TABLE_TITLE_APY}
-
{LABELS.TABLE_TITLE_LTV}
-
{LABELS.TABLE_TITLE_ACTION}
-
- {userObligations.map((item) => {
- return
;
- })}
-
- )}
+
+ {userDeposits.length >0 && (
+
+
+
+ )}
+ {userObligations.length >0 && (
+
+
+
+ )}
+
);
};
diff --git a/src/views/dashboard/obligation/index.tsx b/src/views/dashboard/obligation/index.tsx
new file mode 100644
index 0000000..7cc3443
--- /dev/null
+++ b/src/views/dashboard/obligation/index.tsx
@@ -0,0 +1,25 @@
+import React from "react";
+import { LABELS } from "../../../constants";
+import { useUserObligations } from "./../../../hooks";
+import { ObligationItem } from "./item";
+
+export const DashboardObligations = () => {
+ const { userObligations } = useUserObligations();
+
+ return (
+ <>
+
+
{LABELS.TABLE_TITLE_ASSET}
+
{LABELS.TABLE_TITLE_YOUR_LOAN_BALANCE}
+
{LABELS.TABLE_TITLE_COLLATERAL_BALANCE}
+
{LABELS.TABLE_TITLE_APY}
+
{LABELS.TABLE_TITLE_LTV}
+
{LABELS.TABLE_TITLE_ACTION}
+
+ {userObligations.map((item) => {
+ return