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: adjust the display style of user information on the details page
shuaidf191fa7365c
diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsxindex d47cd5cd..43412747 100644--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx@@ -1,5 +1,5 @@import { memo, FC, useEffect, useRef } from 'react';-import { Row, Col, Button } from 'react-bootstrap';+import { Button } from 'react-bootstrap';import { useTranslation } from 'react-i18next';import { Link, useSearchParams } from 'react-router-dom';@@ -107,8 +107,8 @@ const Index: FC<Props> = ({)}</div>- <Row className="mt-4 mb-3">- <Col className="mb-3 mb-md-0">+ <div className="d-block d-md-flex flex-wrap mt-4 mb-3">+ <div className="mb-3 mb-md-0 me-4 flex-grow-1"><Operateqid={data.question_id}aid={data.id}@@ -119,8 +119,8 @@ const Index: FC<Props> = ({slugTitle={slugTitle}callback={callback}/>- </Col>- <Col lg={3} className="mb-3 mb-md-0">+ </div>+ <div className="mb-3 mb-md-0 me-4" style={{ minWidth: '196px' }}>{data.update_user_info &&data.update_user_info?.username !== data.user_info?.username ? (<UserCard@@ -145,8 +145,8 @@ const Index: FC<Props> = ({className="text-secondary fs-14"/>)}- </Col>- <Col lg={4}>+ </div>+ <div style={{ minWidth: '196px' }}><UserCarddata={data?.user_info}time={Number(data.create_time)}@@ -154,8 +154,8 @@ const Index: FC<Props> = ({isLogged={isLogged}timelinePath={`/posts/${data.question_id}/${data.id}/timeline`}/>- </Col>- </Row>+ </div>+ </div><CommentobjectId={data.id}diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx b/ui/src/pages/Questions/Detail/components/Question/index.tsxindex 2cd8a0de..13f5a6e2 100644--- a/ui/src/pages/Questions/Detail/components/Question/index.tsx+++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx@@ -1,7 +1,7 @@import { memo, FC, useState, useEffect, useRef } from 'react';import { Link, useSearchParams } from 'react-router-dom';import { useTranslation } from 'react-i18next';-import { Row, Col, Button } from 'react-bootstrap';+import { Button } from 'react-bootstrap';import {Tag,@@ -122,8 +122,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {}}/>- <Row className="mt-4 mb-3">- <Col lg={5} className="mb-3 mb-md-0">+ <div className="d-block d-md-flex flex-wrap mt-4 mb-3">+ <div className="mb-3 mb-md-0 me-4 flex-grow-1"><Operateqid={data?.id}type="question"@@ -134,8 +134,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {isAccepted={Boolean(data?.accepted_answer_id)}callback={initPage}/>- </Col>- <Col lg={3} className="mb-3 mb-md-0">+ </div>+ <div style={{ minWidth: '196px' }} className="mb-3 me-4 mb-md-0">{data.update_user_info &&data.update_user_info?.username !== data.user_info?.username ? (<UserCard@@ -160,8 +160,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {className="text-secondary fs-14"/>)}- </Col>- <Col lg={3}>+ </div>+ <div style={{ minWidth: '196px' }}><UserCarddata={data?.user_info}time={data.create_time}@@ -169,8 +169,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {isLogged={isLogged}timelinePath={`/posts/${data.id}/timeline`}/>- </Col>- </Row>+ </div>+ </div><CommentobjectId={data?.id}