diff --git a/frontend/src/components/CurrentPrice.tsx b/frontend/src/components/CurrentPrice.tsx
index fa94833..1f754ab 100644
--- a/frontend/src/components/CurrentPrice.tsx
+++ b/frontend/src/components/CurrentPrice.tsx
@@ -12,30 +12,31 @@ export default function CurrentPrice(
priceInfo,
}: Props,
) {
- let bid = ;
- let ask = ;
- let timestamp = ;
-
- if (priceInfo) {
- bid = {priceInfo.bid} USD;
- ask = {priceInfo.ask} USD;
- timestamp = ;
- }
+ const { ask, bid, last_updated_at } = priceInfo || {};
return (
Current Price
Bid:
- {bid}
+
+ {bid} USD
+
Ask:
- {ask}
+
+ {ask} USD
+
- {timestamp}
+
+ Updated:
+
+
+
+
);
}
diff --git a/frontend/src/components/Timestamp.tsx b/frontend/src/components/Timestamp.tsx
index a3709aa..cf46e31 100644
--- a/frontend/src/components/Timestamp.tsx
+++ b/frontend/src/components/Timestamp.tsx
@@ -13,7 +13,7 @@ export default function Timestamp(
) {
return (
- Updated: {unixTimestampToDate(timestamp).toLocaleDateString("en-US", {
+ {unixTimestampToDate(timestamp).toLocaleDateString("en-US", {
year: "numeric",
month: "numeric",
day: "numeric",
diff --git a/frontend/src/components/Wallet.tsx b/frontend/src/components/Wallet.tsx
index 209beba..19ff5ba 100644
--- a/frontend/src/components/Wallet.tsx
+++ b/frontend/src/components/Wallet.tsx
@@ -14,37 +14,35 @@ export default function Wallet(
}: WalletProps,
) {
const { hasCopied, onCopy } = useClipboard(walletInfo ? walletInfo.address : "");
-
- let balance = ;
- let address = ;
- let timestamp = ;
-
- if (walletInfo) {
- balance = {walletInfo.balance} BTC;
- address = (
-
- {walletInfo.address}
- : }
- onClick={onCopy}
- />
-
- );
- timestamp = ;
- }
+ const { balance, address, last_updated_at } = walletInfo || {};
return (
Your wallet
Balance:
- {balance}
+
+ {balance} BTC
+
- {address}
+
+
+ {address}
+ : }
+ onClick={onCopy}
+ />
+
+
- {timestamp}
+
+ Updated:
+
+
+
+
);
}