Skip to content

Commit 31975e0

Browse files
committed
fix: wrong metadata status background on voted on card
1 parent 074b10d commit 31975e0

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
@@ -14,6 +14,8 @@ changes.
1414

1515
### Fixed
1616

17+
- Fix invalid metadata status background on voted on card
18+
1719
### Changed
1820

1921
### Removed

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)