Skip to content

Commit 779fdcf

Browse files
authored
Merge pull request #3604 from IntersectMBO/fix/wrong-background-of-the-voted-on-governance-action
fix: wrong metadata status background on voted on card
2 parents 97281b8 + 31975e0 commit 779fdcf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ changes.
1616

1717
### Fixed
1818

19+
- Fix invalid metadata status background on voted on card
20+
1921
### Changed
2022

2123
- Update first CTA on GovTool home page [Issue 3467](https://github.com/IntersectMBO/govtool/issues/3467)

govtool/frontend/src/components/molecules/GovernanceVotedOnCard.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export const GovernanceVotedOnCard = ({
5656
bech32Prefix: "gov_action",
5757
});
5858

59+
// When no status provided into the metadataStatus prop,
60+
// we consider it as a valid
61+
const isMetadataValid = metadataStatus === undefined;
62+
5963
return (
6064
<Box
6165
sx={{
@@ -67,13 +71,13 @@ export const GovernanceVotedOnCard = ({
6771
justifyContent: "space-between",
6872
boxShadow: "0px 4px 15px 0px #DDE3F5",
6973
borderRadius: "20px",
70-
backgroundColor: !metadataStatus
74+
backgroundColor: !isMetadataValid
7175
? "rgba(251, 235, 235, 0.50)"
7276
: "rgba(255, 255, 255, 0.3)",
7377
// TODO: To decide if voted on cards can be actually in progress
7478
border: inProgress
7579
? "1px solid #FFCBAD"
76-
: !metadataStatus
80+
: !isMetadataValid
7781
? "1px solid #F6D5D5"
7882
: "1px solid #C0E4BA",
7983
}}

0 commit comments

Comments
 (0)