Skip to content

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: timeline response changed

shuaia8c37f4dabc7
diff --git a/ui/src/common/interface.ts b/ui/src/common/interface.ts
index 97e9bac0..249c26d5 100644
--- a/ui/src/common/interface.ts
+++ b/ui/src/common/interface.ts
@@ -509,13 +509,12 @@ export interface TimelineItem {
revision_id: number;
created_at: number;
activity_type: string;
- username: string;
- user_display_name: string;
comment: string;
object_id: string;
object_type: string;
cancelled: boolean;
cancelled_at: any;
+ user_info: UserInfoBase;
}
export interface TimelineObject {
diff --git a/ui/src/pages/Admin/Answers/components/Action/index.tsx b/ui/src/pages/Admin/Answers/components/Action/index.tsx
index 7e3c70b6..3ced155d 100644
--- a/ui/src/pages/Admin/Answers/components/Action/index.tsx
+++ b/ui/src/pages/Admin/Answers/components/Action/index.tsx
@@ -8,7 +8,6 @@ const AnswerActions = ({ itemData, curFilter, refreshList }) => {
const { t } = useTranslation('translation', { keyPrefix: 'delete' });
const handleAction = (type) => {
- console.log(type);
if (type === 'delete') {
Modal.confirm({
title: t('title'),
diff --git a/ui/src/pages/Admin/Questions/components/Action/index.tsx b/ui/src/pages/Admin/Questions/components/Action/index.tsx
index cdcbcbac..5fe5117a 100644
--- a/ui/src/pages/Admin/Questions/components/Action/index.tsx
+++ b/ui/src/pages/Admin/Questions/components/Action/index.tsx
@@ -11,7 +11,6 @@ const AnswerActions = ({ itemData, refreshList, curFilter }) => {
const toast = useToast();
const handleAction = (type) => {
- console.log(type);
if (type === 'delete') {
Modal.confirm({
title: t('title', { keyPrefix: 'delete' }),
diff --git a/ui/src/pages/Timeline/components/Item/index.tsx b/ui/src/pages/Timeline/components/Item/index.tsx
index 657f4708..302b980c 100644
--- a/ui/src/pages/Timeline/components/Item/index.tsx
+++ b/ui/src/pages/Timeline/components/Item/index.tsx
@@ -109,10 +109,7 @@ const Index: FC<Props> = ({ data, isAdmin, objectInfo, revisionList }) => {
) : (
<BaseUserCard
className="fs-normal"
- data={{
- username: data.username,
- display_name: data.user_display_name,
- }}
+ data={data?.user_info}
showAvatar={false}
showReputation={false}
/>