From a282892ce3ddf07e3ed38600d13aac3146c6e82e Mon Sep 17 00:00:00 2001 From: Alex Soong Date: Mon, 23 Oct 2023 15:38:13 -0700 Subject: [PATCH] Minor UI Improvements (#128) * Hide registration button when user is registered * Improve styling on position row * Refetch usdc balance when Swap renders * Rename deposit to deposits * Update copy on encrypting venmo ids --- client/src/App.tsx | 2 +- client/src/components/Deposit/PositionRow.tsx | 33 ++++++++----------- .../src/components/Deposit/PositionTable.tsx | 8 ++--- .../RegistrationForm/ExistingRegistration.tsx | 2 +- .../components/Swap/OnRamperIntentTable.tsx | 9 +++-- .../src/components/common/AccessoryButton.tsx | 2 +- .../src/components/layouts/TopNav/NavItem.tsx | 6 ++-- .../src/contexts/Balances/BalancesContext.ts | 1 + .../contexts/Balances/BalancesProvider.tsx | 1 + client/src/contexts/Balances/types.ts | 1 + client/src/helpers/tooltips.ts | 2 +- client/src/pages/Swap.tsx | 6 ++++ 12 files changed, 36 insertions(+), 37 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index b0e3863fc..3c0f74a6f 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -56,7 +56,7 @@ const App = () => { } /> } /> - } /> + } /> } /> } /> Not found} /> diff --git a/client/src/components/Deposit/PositionRow.tsx b/client/src/components/Deposit/PositionRow.tsx index 94762e843..471bf1b3d 100644 --- a/client/src/components/Deposit/PositionRow.tsx +++ b/client/src/components/Deposit/PositionRow.tsx @@ -28,8 +28,9 @@ export const PositionRow: React.FC = ({ }: PositionRowProps) => { PositionRow.displayName = "PositionRow"; - const depositRemainingLabel = `${availableDepositAmount} / ${totalDepositAmount}`; - const intentAmountLabel = `${intentCount} (${outstandingIntentAmount})`; + const depositRemainingLabel = `${availableDepositAmount} USDC`; + const intentAmountLabel = `${intentCount} (${outstandingIntentAmount} USDC)`; + const originalAmountLabel = `${totalDepositAmount} USDC` return ( @@ -43,18 +44,21 @@ export const PositionRow: React.FC = ({ - Outstanding Intents:  + Outstanding Orders:  {intentAmountLabel} + + + + {conversionRate} + + + + Deposit Amount:  + {originalAmountLabel} + - - - - - {conversionRate} - - @@ -121,15 +125,6 @@ const SummaryLabelValue = styled.span` color: #FFFFFF; `; -const FeeLabelsContainer = styled.div` - width: 100%; - display: flex; - flex-direction: row; - gap: 8px; - padding-top: 12px; - color: #6C757D; -`; - const PercentageLabel = styled.div` display: flex; `; diff --git a/client/src/components/Deposit/PositionTable.tsx b/client/src/components/Deposit/PositionTable.tsx index 4579517f8..4a049d80a 100644 --- a/client/src/components/Deposit/PositionTable.tsx +++ b/client/src/components/Deposit/PositionTable.tsx @@ -164,16 +164,12 @@ export const PositionTable: React.FC = ({ } } - function feeAmountString(usdcAmountString: string) { - return usdcAmountString + ' USDC'; - } - return ( - Deposit + Deposits {isLoggedIn ? (