Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Aug 23, 2024
1 parent daf58b8 commit c823b47
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/neuron-ui/src/components/NervosDAORecord/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const DAORecord = ({
epochParser(withdrawEpoch || currentEpoch)
)

const leftEpochs = Math.max((compensationEndEpochValue || 0) - currentEpochValue, 0)
const leftEpochs = Math.max(compensationEndEpochValue - currentEpochValue, 0)

let leftHours = ''
let leftDays = ''
Expand Down Expand Up @@ -137,7 +137,9 @@ export const DAORecord = ({
break
}
case CellStatus.Deposited: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = ''
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.next-compensation-cycle-hours', {
hours: leftHours || '--',
})
Expand All @@ -149,7 +151,9 @@ export const DAORecord = ({
break
}
case CellStatus.Locked: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = ''
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.compensation-cycle-will-end-hours', {
hours: leftHours || '--',
})
Expand Down

1 comment on commit c823b47

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 10519023363

Please sign in to comment.