diff --git a/govtool/frontend/src/components/molecules/GovernanceActionCard.tsx b/govtool/frontend/src/components/molecules/GovernanceActionCard.tsx index cbb17ac4b..0be42cea0 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionCard.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionCard.tsx @@ -27,13 +27,11 @@ type ActionTypeProps = Omit< | "abstainVotes" | "metadataHash" | "url" - | "details" | "id" - | "txHash" - | "index" + | "details" + | "rationale" + | "motivation" > & { - txHash: string; - index: number; isDataMissing: boolean; onClick?: () => void; inProgress?: boolean; @@ -44,11 +42,15 @@ export const GovernanceActionCard: FC = ({ ...props }) => { type, inProgress = false, expiryDate, + expiryEpochNo, onClick, createdDate, + createdEpochNo, txHash, index, isDataMissing, + title, + about, } = props; const { isMobile, screenWidth } = useScreenDimension(); const { t } = useTranslation(); @@ -85,13 +87,14 @@ export const GovernanceActionCard: FC = ({ ...props }) => { }} > = ({ ...props }) => { - {data.map(({ label, content }) => ( + {Object.entries(data).map(([label, content]) => ( {label}: diff --git a/govtool/frontend/src/components/molecules/GovernanceActionsDatesBox.tsx b/govtool/frontend/src/components/molecules/GovernanceActionsDatesBox.tsx index 99065e13e..0e302b21d 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionsDatesBox.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionsDatesBox.tsx @@ -8,12 +8,16 @@ import { useScreenDimension, useTranslation } from "@hooks"; type GovernanceActionsDatesBoxProps = { createdDate: string; expiryDate: string; + expiryEpochNo: number; + createdEpochNo: number; isSliderCard?: boolean; }; export const GovernanceActionsDatesBox = ({ createdDate, expiryDate, + expiryEpochNo, + createdEpochNo, isSliderCard, }: GovernanceActionsDatesBoxProps) => { const { t } = useTranslation(); @@ -54,8 +58,7 @@ export const GovernanceActionsDatesBox = ({ > , , @@ -97,8 +100,7 @@ export const GovernanceActionsDatesBox = ({ > , , diff --git a/govtool/frontend/src/components/molecules/GovernanceVotedOnCard.tsx b/govtool/frontend/src/components/molecules/GovernanceVotedOnCard.tsx index 7e5a6aa2b..a93f191f6 100644 --- a/govtool/frontend/src/components/molecules/GovernanceVotedOnCard.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceVotedOnCard.tsx @@ -35,6 +35,17 @@ export const GovernanceVotedOnCard = ({ }: Props) => { const navigate = useNavigate(); const { proposal, vote } = votedProposal; + const { + createdDate, + createdEpochNo, + expiryDate, + expiryEpochNo, + type, + txHash, + index, + title, + about, + } = proposal; const { isMobile, screenWidth } = useScreenDimension(); const { t } = useTranslation(); @@ -60,9 +71,7 @@ export const GovernanceVotedOnCard = ({ ? "1px solid #F6D5D5" : "1px solid #C0E4BA", }} - data-testid={`govaction-${getProposalTypeNoEmptySpaces( - proposal.type, - )}-card`} + data-testid={`govaction-${getProposalTypeNoEmptySpaces(type)}-card`} > @@ -121,14 +130,14 @@ export const GovernanceVotedOnCard = ({