@@ -21,7 +25,9 @@ export const NavBar = () => {
@@ -42,7 +48,9 @@ export const NavBar = () => {
@@ -51,7 +59,9 @@ export const NavBar = () => {
diff --git a/src/components/Inputs/Money/index.tsx b/src/components/Inputs/Money/index.tsx
index 970f76c..7e5fd34 100644
--- a/src/components/Inputs/Money/index.tsx
+++ b/src/components/Inputs/Money/index.tsx
@@ -1,5 +1,5 @@
import React, { useState } from "react";
-import { formatMoney } from "utils/money";
+import { formatMoney } from "utils/format";
interface Props {
label: string;
diff --git a/src/components/StoresCarousel/Chart/index.tsx b/src/components/StoresCarousel/Chart/index.tsx
index f32c16e..202589e 100644
--- a/src/components/StoresCarousel/Chart/index.tsx
+++ b/src/components/StoresCarousel/Chart/index.tsx
@@ -1,5 +1,5 @@
import { Icon } from "components/Icon";
-import { formatMoney } from "utils/money";
+import { formatMoney } from "utils/format";
interface Props {
budget: number;
diff --git a/src/components/TransactionInOut/index.tsx b/src/components/TransactionInOut/index.tsx
index f244229..0d22c0a 100644
--- a/src/components/TransactionInOut/index.tsx
+++ b/src/components/TransactionInOut/index.tsx
@@ -5,7 +5,7 @@ import Link from "next/link";
import { Category } from "types/category";
import { TransactionTypeEnum } from "types/enums/transaction-type";
import { TransactionInOut as TransactionInOutType } from "types/transaction";
-import { formatMoney } from "utils/money";
+import { formatMoney } from "utils/format";
interface Props {
transaction: TransactionInOutType;
diff --git a/src/components/WalletItem/index.tsx b/src/components/WalletItem/index.tsx
new file mode 100644
index 0000000..e24a16e
--- /dev/null
+++ b/src/components/WalletItem/index.tsx
@@ -0,0 +1,37 @@
+import { MdKeyboardArrowRight } from "react-icons/md";
+
+interface Props {
+ iconUrl: string;
+ name: string;
+ label: string;
+ valueLabel: string;
+ value: string;
+}
+
+export const WalletItem = ({
+ iconUrl,
+ name,
+ label,
+ valueLabel,
+ value,
+}: Props) => {
+ return (
+
+
+
+
+ {name}
+ {label}
+
+
+
+ {valueLabel}
+ {value}
+
+
+
+
+ );
+};
diff --git a/src/types/card.ts b/src/types/card.ts
index a6ca3cf..31800a1 100644
--- a/src/types/card.ts
+++ b/src/types/card.ts
@@ -23,15 +23,18 @@ export interface Card {
type: CardTypeEnum;
network: NetworkEnum;
name: string;
+ lastFourDigits: string;
// Credit cards
- lastFourDigits?: string;
dueDay?: number;
statementDays?: number;
limit?: number;
payAt?: PayAtEnum;
payWithBankAccountId?: string;
- // Debit, VA, VR
+ // Debit
bankAccountId?: string;
+
+ // VA, VR, VT
+ balance?: number;
}
diff --git a/src/types/enums/card-type.ts b/src/types/enums/card-type.ts
index 36a2427..79b637a 100644
--- a/src/types/enums/card-type.ts
+++ b/src/types/enums/card-type.ts
@@ -3,4 +3,5 @@ export enum CardTypeEnum {
"DEBIT" = "DEBIT",
"VA" = "VA",
"VR" = "VR",
+ "VT" = "VT",
}
diff --git a/src/utils/money.ts b/src/utils/format.ts
similarity index 50%
rename from src/utils/money.ts
rename to src/utils/format.ts
index c2eb777..5c2537a 100644
--- a/src/utils/money.ts
+++ b/src/utils/format.ts
@@ -4,3 +4,8 @@ const formatter = new Intl.NumberFormat("pt-BR", {
});
export const formatMoney = (price: number) => formatter.format(price / 100);
+
+export const formatBankAccount = (bankAccount: string) =>
+ `${bankAccount.substring(0, bankAccount.length - 1)}-${bankAccount.substring(
+ bankAccount.length - 1,
+ )}`;
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 73fd7ab..2db297b 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -24,7 +24,7 @@ module.exports = {
"primary-content": "#333333",
secondary: "#5838F5",
"secondary-content": "#ffffff",
- accent: "#ffffff",
+ accent: "#f4f4f4",
neutral: "#3855F5",
"neutral-content": "#ffffff",
"base-100": "#ffffff",