From 0e1216b8e18fd501e056dd3738b708d456b59cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Tue, 27 Feb 2024 10:54:10 +0100 Subject: [PATCH] [#119] Post code review adjustments --- .../src/components/molecules/DashboardActionCard.tsx | 5 +++-- .../frontend/src/components/molecules/VoteActionForm.tsx | 2 +- govtool/frontend/src/pages/Dashboard.tsx | 7 ++----- govtool/frontend/src/pages/DelegateTodRep.tsx | 7 ++----- govtool/frontend/src/pages/RegisterAsSoleVoter.tsx | 7 ++----- govtool/frontend/src/pages/RegisterAsdRep.tsx | 7 ++----- govtool/frontend/src/pages/RetireAsSoleVoter.tsx | 7 ++----- govtool/frontend/src/pages/UpdatedRepMetadata.tsx | 7 ++----- govtool/frontend/src/utils/checkIsWalletConnected.ts | 5 +++++ govtool/frontend/src/utils/index.ts | 3 ++- 10 files changed, 23 insertions(+), 34 deletions(-) create mode 100644 govtool/frontend/src/utils/checkIsWalletConnected.ts diff --git a/govtool/frontend/src/components/molecules/DashboardActionCard.tsx b/govtool/frontend/src/components/molecules/DashboardActionCard.tsx index 48bd969ec..d394c12a4 100644 --- a/govtool/frontend/src/components/molecules/DashboardActionCard.tsx +++ b/govtool/frontend/src/components/molecules/DashboardActionCard.tsx @@ -2,7 +2,7 @@ import { Box, ButtonProps, Skeleton } from "@mui/material"; import { FC, ReactNode } from "react"; import { CopyButton, LoadingButton, Typography } from "@atoms"; -import { useScreenDimension } from "@hooks"; +import { useScreenDimension, useTranslation } from "@hooks"; import { theme } from "@/theme"; type DashboardActionCardProps = { @@ -31,6 +31,7 @@ type DashboardActionCardProps = { export const DashboardActionCard: FC = ({ ...props }) => { + const { t } = useTranslation(); const { cardId, cardTitle, @@ -83,7 +84,7 @@ export const DashboardActionCard: FC = ({ }} > - In progress + {t("inProgress").toLocaleUpperCase()} )} diff --git a/govtool/frontend/src/components/molecules/VoteActionForm.tsx b/govtool/frontend/src/components/molecules/VoteActionForm.tsx index 211d6ad50..920021f24 100644 --- a/govtool/frontend/src/components/molecules/VoteActionForm.tsx +++ b/govtool/frontend/src/components/molecules/VoteActionForm.tsx @@ -142,7 +142,7 @@ export const VoteActionForm = ({ /> - {voter?.isRegisteredAsDRep && ( + {(voter?.isRegisteredAsDRep || voter?.isRegisteredAsSoleVoter) && (