Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

fix: update logic display status epoch #3095

Merged
merged 1 commit into from
Mar 4, 2024
Merged
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
40 changes: 24 additions & 16 deletions src/components/commons/Epoch/FirstEpoch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,35 @@ export default function FirstEpoch({ data: currentEpochData, onClick }: IProps)
icon: ExchangeIcon,
hideHeader: true,
title: (
<EpochNumber>
<EpochNumber sx={{ mt: `${currentEpochData?.status === "SYNCING" ? "30px" : ""}` }}>
<Box component={"span"}>{currentEpochData?.no}</Box>
</EpochNumber>
),
value: (
<Box display={"flex"} alignItems="center" justifyContent={"center"}>
<ProgressCircle
size={100}
pathLineCap="butt"
pathWidth={6}
trailWidth={6}
percent={Number(progress)}
trailOpacity={1}
>
<EpochProgress
status={currentEpochData?.status as keyof typeof EPOCH_STATUS}
>{`${progress}%`}</EpochProgress>
<Status status={currentEpochData?.status as keyof typeof EPOCH_STATUS}>
{EPOCH_STATUS_MAPPING[EPOCH_STATUS[currentEpochData?.status]]}
</Status>
</ProgressCircle>
{currentEpochData?.status === "SYNCING" ? (
<Box>
<Status status={currentEpochData?.status as keyof typeof EPOCH_STATUS}>
{EPOCH_STATUS_MAPPING[EPOCH_STATUS[currentEpochData?.status]]}
</Status>
</Box>
) : (
<ProgressCircle
size={100}
pathLineCap="butt"
pathWidth={6}
trailWidth={6}
percent={Number(progress)}
trailOpacity={1}
>
<EpochProgress
status={currentEpochData?.status as keyof typeof EPOCH_STATUS}
>{`${progress}%`}</EpochProgress>
<Status status={currentEpochData?.status as keyof typeof EPOCH_STATUS}>
{EPOCH_STATUS_MAPPING[EPOCH_STATUS[currentEpochData?.status]]}
</Status>
</ProgressCircle>
)}
</Box>
)
},
Expand Down
Loading