mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 19:56:10 +08:00
fix profile card display invalid date when profile doesn't have a expire date. (#85)
This commit is contained in:
parent
890790ca4f
commit
9b081a5adb
|
@ -228,7 +228,9 @@ const ProfileItem: React.FC<Props> = (props) => {
|
|||
className={`mt-2 flex justify-between ${isCurrent ? 'text-white' : 'text-foreground'}`}
|
||||
>
|
||||
<small>{extra ? `${calcTraffic(usage)}/${calcTraffic(total)}` : undefined}</small>
|
||||
<small>{extra ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''}</small>
|
||||
<small>
|
||||
{extra && extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''}
|
||||
</small>
|
||||
</div>
|
||||
)}
|
||||
{info.type === 'local' && (
|
||||
|
|
|
@ -114,7 +114,9 @@ const ProfileCard: React.FC = () => {
|
|||
className={`mt-2 flex justify-between ${match ? 'text-white' : 'text-foreground'} `}
|
||||
>
|
||||
<small>{extra ? `${calcTraffic(usage)}/${calcTraffic(total)}` : undefined}</small>
|
||||
<small>{extra ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''}</small>
|
||||
<small>
|
||||
{extra && extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''}
|
||||
</small>
|
||||
</div>
|
||||
)}
|
||||
{info.type === 'local' && (
|
||||
|
|
Loading…
Reference in New Issue
Block a user