Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style: update link handling in PlanTag component to use react-router-dom (#10673)

YuTengjing3aceeb6d94e5
diff --git a/src/features/User/PlanTag.tsx b/src/features/User/PlanTag.tsx
index b4a86f45801..5d5f9bca35a 100644
--- a/src/features/User/PlanTag.tsx
+++ b/src/features/User/PlanTag.tsx
@@ -1,8 +1,8 @@
import { Tag } from '@lobehub/ui';
import { useTheme } from 'antd-style';
-import Link from 'next/link';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
+import { Link } from 'react-router-dom';
import urlJoin from 'url-join';
import { OFFICIAL_URL } from '@/const/url';
@@ -37,12 +37,12 @@ const PlanTag = memo<PlanTagProps>(({ type = PlanType.Preview }) => {
return (
<Link
- href={urlJoin(
+ style={{ cursor: 'pointer' }}
+ target={isDesktop ? '_blank' : undefined}
+ to={urlJoin(
isDesktop ? OFFICIAL_URL : '/',
isFree ? '/subscription/plans' : '/subscription/usage',
)}
- style={{ cursor: 'pointer' }}
- target={isDesktop ? '_blank' : undefined}
>
<PlanIcon plan={type} size={22} type={'tag'} />
</Link>