Skip to content

Commit

Permalink
Merge pull request #53 from IntersectMBO/3rd-fix-for-#2438
Browse files Browse the repository at this point in the history
3rd fix for #2438
  • Loading branch information
nebojsact authored Dec 6, 2024
2 parents 023461a + baeeac9 commit 3f396de
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
9 changes: 9 additions & 0 deletions pdf-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
As a minor extension, we also keep a semantic version for the `UNRELEASED`
changes.

## [v0.5.5](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.5) 2024-12-06

### Added -
### Fixed -
- Fix display Stake Address and Amount in Draft [Issue #2438](https://github.com/IntersectMBO/govtool/issues/2438)
- Fix Test Id names in review form [Issue #2437](https://github.com/IntersectMBO/govtool/issues/2437)
### Changed -
### Removed -

## [v0.5.4](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.4) 2024-12-05

### Added -
Expand Down
2 changes: 1 addition & 1 deletion pdf-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pdf-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intersect.mbo/pdf-ui",
"version": "0.5.4",
"version": "0.5.5",
"description": "Proposal discussion ui",
"main": "./src/index.js",
"exports": {
Expand Down
8 changes: 5 additions & 3 deletions pdf-ui/src/components/CreationGoveranceAction/Step2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ const Step2 = ({
setLoading(true);
try {
const governanceActionTypeList = await getGovernanceActionTypes();

const mappedData = governanceActionTypeList?.data?.map((item) => ({
value: item?.id,
label: item?.attributes?.gov_action_type_name,
}));

setGovernanceActionTypes(mappedData);
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -118,6 +116,11 @@ const Step2 = ({
fetchGovernanceActionTypes();
}, []);

useEffect(()=>{
setSelectedGovActionName(governanceActionTypes.find(
(option) => option?.value === +proposalData?.gov_action_type_id
)?.label || '')
},[governanceActionTypes])
return (
<Card>
<CardContent
Expand Down Expand Up @@ -363,7 +366,6 @@ const Step2 = ({
: 'rationale-helper',
}}
/>

{selectedGovActionName === 'Treasury' ? (
<>
<Box
Expand Down
4 changes: 2 additions & 2 deletions pdf-ui/src/components/CreationGoveranceAction/Step3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const Step3 = ({
<Typography
variant='body1'
gutterBottom
data-testid='receiving-address-${index}-content'
data-testid={`receiving-address-${index}-content`}
>
{withdrawal.prop_receiving_address}
</Typography>
Expand All @@ -213,7 +213,7 @@ const Step3 = ({
<Typography
variant='body1'
gutterBottom
data-testid='amount-${index}-content'
data-testid={`amount-${index}-content`}
>
{withdrawal.prop_amount}
</Typography>
Expand Down

0 comments on commit 3f396de

Please sign in to comment.