mirror of https://github.com/langgenius/dify.git
fix: expired date calc error
This commit is contained in:
parent
4a51a72c1d
commit
bbc5ec8301
|
@ -13,7 +13,7 @@ const LicenseNav = () => {
|
|||
|
||||
if (systemFeatures.license?.status === LicenseStatus.EXPIRING) {
|
||||
const expiredAt = systemFeatures.license?.expired_at
|
||||
const count = dayjs(expiredAt).diff(dayjs(), 'days')
|
||||
const count = dayjs(expiredAt).diff(dayjs(), 'day')
|
||||
return <div className='px-2 py-1 mr-4 rounded-full bg-util-colors-orange-orange-50 border-util-colors-orange-orange-100 system-xs-medium text-util-colors-orange-orange-600'>
|
||||
{count <= 1 && <span>{t('common.license.expiring', { count })}</span>}
|
||||
{count > 1 && <span>{t('common.license.expiring_plural', { count })}</span>}
|
||||
|
|
Loading…
Reference in New Issue