diff --git a/ui/src/components/UserCard/index.tsx b/ui/src/components/UserCard/index.tsx index 65e6eaf6..259ab8c5 100644 --- a/ui/src/components/UserCard/index.tsx +++ b/ui/src/components/UserCard/index.tsx @@ -1,6 +1,8 @@ import { memo, FC } from 'react'; import { Link } from 'react-router-dom'; +import classnames from 'classnames'; + import { Avatar, FormatTime } from '@answer/components'; import { formatCount } from '@/utils'; @@ -9,20 +11,31 @@ interface Props { data: any; time: number; preFix: string; + className?: string; } -const Index: FC = ({ data, time, preFix }) => { +const Index: FC = ({ data, time, preFix, className = '' }) => { return ( -
+
{data?.status !== 'deleted' ? ( - + + + ) : ( )} -
-
+
+
{data?.status !== 'deleted' ? ( {data?.display_name} diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsx index ebc9ddf2..b7bd25d8 100644 --- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx +++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx @@ -102,7 +102,7 @@ const Index: FC = ({
- + = ({ callback={callback} /> - + {data.update_user_info?.username !== data.user_info?.username ? ( = ({ data, initPage, hasAnswer }) => { : ''} -
+ +
= ({ data, initPage, hasAnswer }) => { {followed ? 'Following' : 'Follow'}
-
+
{data?.tags?.map((item: any) => { return ( = ({ data, initPage, hasAnswer }) => {
= ({ data, initPage, hasAnswer }) => { /> - + = ({ data, initPage, hasAnswer }) => { callback={initPage} /> - + {data.update_user_info?.username !== data.user_info?.username ? ( { return ( <> - + - + {question?.operation?.operation_type && ( )} @@ -154,6 +154,7 @@ const Index = () => { />
)} + {!question?.operation?.operation_type && (