fix: getDaysBetweenDatesWithAutoRenewal

This commit is contained in:
hamster1963
2024-12-20 01:12:24 +08:00
parent b8f991a80b
commit 3c7640cc82
3 changed files with 13 additions and 2 deletions

View File

@@ -18,7 +18,12 @@ export default function BillingInfo({ parsedData }: { parsedData: PublicNoteData
if (parsedData.billingDataMod.endDate.startsWith("0000-00-00")) {
isNeverExpire = true
} else {
daysLeftObject = getDaysBetweenDatesWithAutoRenewal(parsedData.billingDataMod)
try {
daysLeftObject = getDaysBetweenDatesWithAutoRenewal(parsedData.billingDataMod)
} catch (error) {
console.error(error)
return <div className={cn("text-[10px] text-muted-foreground text-red-600")}>剩余时间: 计算出错</div>
}
}
}