Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/272-display-plain-json-as-descriptions-in-governance-actions #273

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ changes.
### Fixed
- Fix drep voting power calculation [Issue 231](https://github.com/IntersectMBO/govtool/issues/231)
- Fix proposal/list and network/metrics bug that appeared when noone has delegated their funds either to drep_always_abstain or drep_always_no_confidence [Issue 231](https://github.com/IntersectMBO/govtool/issues/231)
- Fix GA details [Issue 272](https://github.com/IntersectMBO/govtool/issues/272)
- Fix copy for maintenance page [Issue 180](https://github.com/IntersectMBO/govtool/issues/180)
- Fix misleading metadata hash text [Issue 90](https://github.com/IntersectMBO/govtool/issues/90)
- Fixed vote calculation problems related to NoConfidence DRep [Issue 59](https://github.com/IntersectMBO/govtool/issues/59)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from "@mui/material";
import { Button, Typography } from "../atoms";
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
import { GovActionDetails, VoteActionForm, VotesSubmitted } from "../molecules";
import { VoteActionForm, VotesSubmitted } from "../molecules";
import { useModal } from "@context";
import { useScreenDimension, useTranslation } from "@hooks";
import { ICONS } from "@consts";
Expand Down Expand Up @@ -164,22 +164,18 @@ export const GovernanceActionDetailsCard = ({
<Typography color="neutralGray" variant="caption">
{t("govActions.details")}
</Typography>
{typeof details === "object" && details !== null ? (
Object.entries(details).map(([key, value]) => {
return (
<div key={key}>
{<GovActionDetails title={key} value={value} />}
</div>
);
})
) : (
<Box>
<Typography
sx={{ textOverflow: "ellipsis", overflow: "hidden" }}
variant="caption"
sx={{
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "pre-line",
}}
>
{details}
{JSON.stringify(details, null, 1)}
</Typography>
)}
</Box>
</Box>
</Box>
<Button
Expand Down
Loading