Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(FollowingTags): Adjust the following button to function like the edit button

haitao(lj)2d0d0b5e699b
diff --git a/ui/src/components/FollowingTags/index.tsx b/ui/src/components/FollowingTags/index.tsx
index adf189db..f52a2e98 100644
--- a/ui/src/components/FollowingTags/index.tsx
+++ b/ui/src/components/FollowingTags/index.tsx
@@ -1,7 +1,6 @@
import { FC, memo, useState } from 'react';
import { Card, Button } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
-import { NavLink } from 'react-router-dom';
import { TagSelector, Tag } from '@/components';
import { tryLoggedAndActivated } from '@/utils/guard';
@@ -78,11 +77,13 @@ const Index: FC = () => {
) : (
<>
<div className="text-muted">{t('follow_tag_tip')}</div>
- <NavLink className="d-inline-block mt-3" to="/tags">
- <Button size="sm" variant="outline-primary">
- {t('follow_a_tag')}
- </Button>
- </NavLink>
+ <Button
+ size="sm"
+ className="mt-3"
+ variant="outline-primary"
+ onClick={() => setEditState(true)}>
+ {t('follow_a_tag')}
+ </Button>
</>
)}
</Card.Body>