fix(questionList): remove bg on list-group-item

This commit is contained in:
haitao(lj) 2022-12-16 18:58:30 +08:00
parent 13c472e141
commit baf302458e
2 changed files with 8 additions and 7 deletions

View File

@ -120,7 +120,9 @@ const QuestionList: FC<Props> = ({ source }) => {
<ListGroup variant="flush" className="border-top border-bottom-0">
{listData?.list?.map((li) => {
return (
<ListGroup.Item key={li.id} className="border-bottom py-3 px-0">
<ListGroup.Item
key={li.id}
className="border-bottom bg-transparent py-3 px-0">
<h5 className="text-wrap text-break">
<NavLink
to={pathFactory.questionLanding(li.id, li.url_title)}

View File

@ -1,5 +1,4 @@
import { FC, memo } from 'react';
import { ListGroup, ListGroupItem } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
import { pathFactory } from '@/router/pathFactory';
@ -12,11 +11,11 @@ interface Props {
const Index: FC<Props> = ({ data, type }) => {
const { t } = useTranslation('translation', { keyPrefix: 'personal' });
return (
<ListGroup variant="flush" className="mb-4">
<ol className="mb-4 list-unstyled">
{data?.map((item) => {
return (
<ListGroupItem
className="p-0 border-0 mb-2"
<li
className="mb-2"
key={type === 'answer' ? item.answer_id : item.question_id}>
<a
href={
@ -58,10 +57,10 @@ const Index: FC<Props> = ({ data, type }) => {
<span> {t('accepted')}</span>
</div>
)}
</ListGroupItem>
</li>
);
})}
</ListGroup>
</ol>
);
};