Skip to content

Commit

Permalink
Merge branch 'main' into supportUs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Oct 31, 2024
2 parents 70ea9db + 73fcabf commit 1fa2607
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ export default function Chronology ({ address, currentTreasuryApprovalList, refe
setExpanded(isExpanded);
}, []);

const timelineStage = useMemo(() => {
if (isTreasury && isExecuted) {
return `(${treasuryLabel})`;
} else if (sortedHistory?.length) {
return `(${pascalCaseToTitleCase(sortedHistory[0].status)?.trim() || treasuryLabel})`;
} else {
return '';
}
}, [isExecuted, isTreasury, sortedHistory, treasuryLabel]);

return (
<Accordion expanded={expanded} onChange={handleChange} style={style.accordionStyle}>
<AccordionSummary
Expand All @@ -131,13 +141,13 @@ export default function Chronology ({ address, currentTreasuryApprovalList, refe
sx={{ borderBottom: expanded ? `1px solid ${theme.palette.text.disabled}` : 'none', px: 0 }}
>
<Grid container item>
<Grid alignItems='baseline' container item>
<Grid alignItems='center' container item>
<Typography fontSize={24} fontWeight={500}>
{t('Timeline')}
</Typography>
{!expanded &&
<Typography fontSize={16} fontWeight={300} sx={{ color: 'text.disabled', ml: '10px' }}>
({ isTreasury && isExecuted ? treasuryLabel : sortedHistory?.length ? treasuryLabel || pascalCaseToTitleCase(sortedHistory[0].status)?.trim() : ''})
{timelineStage}
</Typography>
}
</Grid>
Expand Down

0 comments on commit 1fa2607

Please sign in to comment.