Skip to content

Commit

Permalink
Merge pull request #3047 from cardano-foundation/fix/show-format-time…
Browse files Browse the repository at this point in the history
…-wrong

fix: show wrong time format
  • Loading branch information
Sotatek-TaiTruong authored Feb 23, 2024
2 parents 02f0497 + c19f501 commit 3079382
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/components/Account/OverviewTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const OverviewTab = () => {
/>
<RowItem
label={t("account.lastLogin")}
value={moment(userData?.lastLogin).format("MM/DD/YYYY hh:mm:ss")}
value={moment(userData?.lastLogin).format("MM/DD/YYYY HH:mm:ss")}
isTablet={isTablet}
/>
{openModal && <ConnectWalletModal open={openModal} setOpen={setOpenModal} />}
Expand Down
35 changes: 17 additions & 18 deletions src/components/CIPComplianceModal/CIP25Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
CIPPropertyTable,
TokenLabel,
ButtonContainer,
CIPLabel
CIPLabel,
BoxTooltip
} from "./styles";
import ViewAllButtonExternal from "../commons/ViewAllButtonExternal";

Expand Down Expand Up @@ -105,19 +106,19 @@ const CIP25Modal: React.FC<TCIP25ModalProps> = (props) => {
</Typography>
</CustomTooltip>
) : (
<CustomTooltip title={r.value}>
<CustomTooltip title={r.value}>
<Typography
textOverflow="ellipsis"
overflow="hidden"
whiteSpace="nowrap"
display="inline-block"
maxWidth={120}
fontSize={14}
>
{r.value}
</Typography>
</CustomTooltip>
<CustomTooltip
title={<BoxTooltip>{typeof r.value === "object" ? JSON.stringify(r.value) : r.value}</BoxTooltip>}
>
<Typography
textOverflow="ellipsis"
overflow="hidden"
whiteSpace="nowrap"
display="inline-block"
maxWidth={120}
fontSize={14}
>
{typeof r.value === "object" && r.value !== null ? JSON.stringify(r.value) : r.value}
</Typography>
</CustomTooltip>
)
},
Expand Down Expand Up @@ -173,12 +174,11 @@ const CIP25Modal: React.FC<TCIP25ModalProps> = (props) => {
return (
<CustomModal
modalContainerProps={{ style: { maxWidth: "min(1000px, 98vw)" } }}
maxWidth={920}
open={props.open}
style={{ maxHeight: "unset" }}
onClose={props.onClose}
title={
<CIPLabel data-testid="cip25-modal-title">
<CIPLabel data-testid="token-CIP25Compliance">
<span>{t("cip25.modal.title")}</span>
<ButtonContainer>
<ViewAllButtonExternal tooltipTitle={t("cip25.viewDocs")} to={CIP25_DOCS_URL} />
Expand All @@ -187,8 +187,7 @@ const CIP25Modal: React.FC<TCIP25ModalProps> = (props) => {
}
>
<ModalContent>
<CIPModalDesc data-testid="cip25-modal-subtitle">{t("cip25.modal.subtitle")}</CIPModalDesc>

<CIPModalDesc>{t("cip25.modal.subtitle")}</CIPModalDesc>
{tokenMaps.map((token, index) => (
<React.Fragment key={index}>
{token.tokenName && (
Expand Down
4 changes: 2 additions & 2 deletions src/components/CIPComplianceModal/CIP60Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const CIP60Modal: React.FC<TCIP60ComplianceModalProps> = (props) => {
</Typography>
</CustomTooltip>
) : (
<CustomTooltip title={typeof r.value === "object" ? JSON.stringify(r.value) : r.value}>
<CustomTooltip title={typeof r.value === "object" && r.value !== null ? JSON.stringify(r.value) : r.value}>
<Typography
textOverflow="ellipsis"
overflow="hidden"
Expand All @@ -167,7 +167,7 @@ const CIP60Modal: React.FC<TCIP60ComplianceModalProps> = (props) => {
maxWidth={120}
fontSize={14}
>
{typeof r.value === "object" ? JSON.stringify(r.value) : r.value}
{typeof r.value === "object" && r.value !== null ? JSON.stringify(r.value) : r.value}
</Typography>
</CustomTooltip>
);
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1011,5 +1011,6 @@
"bolnisi.titleModal": "Georgian Wine",
"bolnisi.verifyErrorTooltip": "A connection to the verification service could not be established.",
"bolnisi.verifyErrorTooltipTryAgain": "Please, refresh the page to try again.",
"bolnisi.verifyError": "Verification Unavailable"
"bolnisi.verifyError": "Verification Unavailable",
"account.myProfile":"My Profile"
}

0 comments on commit 3079382

Please sign in to comment.