diff --git a/src/renderer/src/components/profiles/profile-item.tsx b/src/renderer/src/components/profiles/profile-item.tsx index 03cc2e9..66ddc57 100644 --- a/src/renderer/src/components/profiles/profile-item.tsx +++ b/src/renderer/src/components/profiles/profile-item.tsx @@ -228,7 +228,9 @@ const ProfileItem: React.FC = (props) => { className={`mt-2 flex justify-between ${isCurrent ? 'text-white' : 'text-foreground'}`} > {extra ? `${calcTraffic(usage)}/${calcTraffic(total)}` : undefined} - {extra ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''} + + {extra && extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''} + )} {info.type === 'local' && ( diff --git a/src/renderer/src/components/sider/profile-card.tsx b/src/renderer/src/components/sider/profile-card.tsx index 6da7132..ff03a9c 100644 --- a/src/renderer/src/components/sider/profile-card.tsx +++ b/src/renderer/src/components/sider/profile-card.tsx @@ -114,7 +114,9 @@ const ProfileCard: React.FC = () => { className={`mt-2 flex justify-between ${match ? 'text-white' : 'text-foreground'} `} > {extra ? `${calcTraffic(usage)}/${calcTraffic(total)}` : undefined} - {extra ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''} + + {extra && extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : ''} + )} {info.type === 'local' && (