|
1 | | -import { useMemo, useState } from "react"; |
| 1 | +import { useMemo, useState, Fragment } from "react"; |
2 | 2 | import { Box, Tabs, Tab, styled, Skeleton } from "@mui/material"; |
3 | 3 | import { useLocation } from "react-router-dom"; |
4 | 4 |
|
5 | | -import { CopyButton, ExternalModalButton, Typography } from "@atoms"; |
| 5 | +import { CopyButton, ExternalModalButton, Tooltip, Typography } from "@atoms"; |
6 | 6 | import { |
7 | 7 | GovernanceActionCardElement, |
8 | 8 | GovernanceActionDetailsCardLinks, |
@@ -76,6 +76,7 @@ export const GovernanceActionDetailsCardData = ({ |
76 | 76 | isValidating, |
77 | 77 | proposal: { |
78 | 78 | abstract, |
| 79 | + authors, |
79 | 80 | createdDate, |
80 | 81 | createdEpochNo, |
81 | 82 | details, |
@@ -365,6 +366,35 @@ export const GovernanceActionDetailsCardData = ({ |
365 | 366 | /> |
366 | 367 | </> |
367 | 368 | )} |
| 369 | + <GovernanceActionCardElement |
| 370 | + label={t("govActions.authors.title")} |
| 371 | + text={ |
| 372 | + (authors ?? []).length <= 0 |
| 373 | + ? t("govActions.authors.noDataAvailable") |
| 374 | + : (authors ?? []).map((author, idx, arr) => ( |
| 375 | + <Fragment key={author.publicKey}> |
| 376 | + <Tooltip |
| 377 | + heading={`${t("govActions.authors.witnessAlgorithm")}: ${ |
| 378 | + author.witnessAlgorithm |
| 379 | + }`} |
| 380 | + paragraphOne={`${t("govActions.authors.publicKey")}: ${ |
| 381 | + author.publicKey |
| 382 | + }`} |
| 383 | + paragraphTwo={`${t("govActions.authors.signature")}: ${ |
| 384 | + author.signature |
| 385 | + }`} |
| 386 | + placement="bottom-end" |
| 387 | + arrow |
| 388 | + > |
| 389 | + <span>{author.name}</span> |
| 390 | + </Tooltip> |
| 391 | + {idx < arr.length - 1 && <span>, </span>} |
| 392 | + </Fragment> |
| 393 | + )) |
| 394 | + } |
| 395 | + textVariant="longText" |
| 396 | + dataTestId="authors" |
| 397 | + /> |
368 | 398 |
|
369 | 399 | <GovernanceActionDetailsCardLinks links={references} /> |
370 | 400 | </Box> |
|
0 commit comments