You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by ro...@apache.org on 2024/09/03 03:59:17 UTC
(incubator-answer) 01/04: refactor: Add links to badge names and award counts in Admin Badges page
This is an automated email from the ASF dual-hosted git repository.
robin0716 pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 8b9f5d4448f9e4a4498631d5c6c5131f4da557d4
Author: robin <ro...@rnode.me>
AuthorDate: Mon Sep 2 16:35:33 2024 +0800
refactor: Add links to badge names and award counts in Admin Badges page
---
ui/src/pages/Admin/Badges/index.tsx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ui/src/pages/Admin/Badges/index.tsx b/ui/src/pages/Admin/Badges/index.tsx
index e76f90eb..4cadc1c3 100644
--- a/ui/src/pages/Admin/Badges/index.tsx
+++ b/ui/src/pages/Admin/Badges/index.tsx
@@ -19,7 +19,7 @@
import { FC } from 'react';
import { Form, Table, Stack } from 'react-bootstrap';
-import { useSearchParams } from 'react-router-dom';
+import { Link, useSearchParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import classNames from 'classnames';
@@ -126,13 +126,15 @@ const Badges: FC = () => {
/>
)}
<div>
- <div className="text-primary">{badge.name}</div>
+ <Link to={`/badges/${badge.id}`}>{badge.name}</Link>
<div className="text-body small">{badge.description}</div>
</div>
</td>
<td>{badge.group_name}</td>
- <td className="text-primary">{badge.award_count}</td>
+ <td>
+ <Link to={`/badges/${badge.id}`}>{badge.award_count}</Link>
+ </td>
<td>
<span className={classNames('badge', bgMap[badge.status])}>
{t(badge.status)}