This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git
The following commit(s) were added to refs/heads/test by this push:
new 4be3a684 fix: click area for pinned questions
4be3a684 is described below
commit 4be3a68477a021ef601442e5d70dfef40bcdf652
Author: shuai <[email protected]>
AuthorDate: Wed Feb 26 10:57:21 2025 +0800
fix: click area for pinned questions
---
ui/src/components/PinList/index.tsx | 4 ++--
ui/src/components/QuestionList/index.tsx | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ui/src/components/PinList/index.tsx
b/ui/src/components/PinList/index.tsx
index 7907b462..08f1813d 100644
--- a/ui/src/components/PinList/index.tsx
+++ b/ui/src/components/PinList/index.tsx
@@ -45,14 +45,14 @@ const PinList: FC<IProps> = ({ data }) => {
action
as="li"
key={item.id}
- className="rounded border-top p-3"
+ className="rounded border-top p-0"
style={{
minWidth: '238px',
width: `${100 / data.length}%`,
}}>
<NavLink
to={pathFactory.questionLanding(item.id, item.url_title)}
- className="h-100 d-flex flex-column justify-content-between">
+ className="h-100 d-flex flex-column justify-content-between
p-3">
<h6 className="text-wrap link-dark text-break text-truncate-2">
{item.title}
{item.status === 2 ? ` [${t('closed')}]` : ''}
diff --git a/ui/src/components/QuestionList/index.tsx
b/ui/src/components/QuestionList/index.tsx
index 5361e1fe..cf1de562 100644
--- a/ui/src/components/QuestionList/index.tsx
+++ b/ui/src/components/QuestionList/index.tsx
@@ -144,6 +144,7 @@ const QuestionList: FC<Props> = ({
<ListGroup.Item
key={li.id}
action
+ as="li"
onClick={() =>
handleNavigate(
pathFactory.questionLanding(li.id, li.url_title),
@@ -191,7 +192,9 @@ const QuestionList: FC<Props> = ({
return (
<Tag
key={tag.slug_name}
- className={`${li.tags.length - 1 === index ? ''
: 'me-1'}`}
+ className={`${
+ li.tags.length - 1 === index ? '' : 'me-1'
+ }`}
data={tag}
/>
);