From 3bfaf80f6690b20e8ef9964460f16e3d78b08add Mon Sep 17 00:00:00 2001 From: hemulin Date: Mon, 4 Dec 2023 14:12:04 +0000 Subject: [PATCH] Minor wording changes on the front --- frontend/src/components/NavigationBar.tsx | 6 +++--- frontend/src/pages/admin/pages/OrdersPage.tsx | 18 +++++++++--------- .../pages/components/InteractionsWidget.tsx | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/NavigationBar.tsx b/frontend/src/components/NavigationBar.tsx index 86e30ea..297ffa3 100644 --- a/frontend/src/components/NavigationBar.tsx +++ b/frontend/src/components/NavigationBar.tsx @@ -47,7 +47,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/accounts/register")} > - Register + Register user )} @@ -68,7 +68,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/admin/orders")} > - Orders + Orders management )} {!authContext.isAdmin && ( @@ -79,7 +79,7 @@ export const NavigationBar: React.FC = ({ ...props }) => { }} onClick={() => navigate("/client/issue")} > - Issue + Place order )} { await Promise.all( Array.from(Array(details.currentEpoch.toNumber() + 1)) - .map(async (_, index) => { - epochList[index] = { - ...(await contract.epochDetails(tokenAddress, index)) as any, - orders: (await contract.epochOrders(tokenAddress, index)) - }; - }) - ); - - setTokenDetails({ + .map(async (_, index) => { + epochList[index] = { + ...(await contract.epochDetails(tokenAddress, index)) as any, + orders: (await contract.epochOrders(tokenAddress, index)) + }; + }) + ); + + setTokenDetails({ tokenDetails: { tokenAddress, currentEpoch: details.currentEpoch diff --git a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx index 4e4316e..7d43217 100644 --- a/frontend/src/pages/client/pages/components/InteractionsWidget.tsx +++ b/frontend/src/pages/client/pages/components/InteractionsWidget.tsx @@ -93,12 +93,12 @@ export const InteractionsWidget: React.FC = () => { await tx.wait(); setLoading(false); - snackbar.enqueueSnackbar(`${!value ? "Buy" : "Sell"} success`, { + snackbar.enqueueSnackbar(`Order placed successfully`, { variant: "success", }); } catch (e) { setLoading(false); - snackbar.enqueueSnackbar(`${!value ? "Buy" : "Sell"} fail`, { + snackbar.enqueueSnackbar(`Order placement failed`, { variant: "error", }); }