From 61641bc7c608110d801a025e527625359b6a0480 Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Tue, 30 Jul 2024 15:23:34 +0100 Subject: [PATCH] Fixed ActivityPub app tabs content (#20690) no refs The `Activity` and `Likes` tabs of the AcitivityPub app were not showing the correct content. This commit fixes that. --- .../src/components/ListIndex.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/admin-x-activitypub/src/components/ListIndex.tsx b/apps/admin-x-activitypub/src/components/ListIndex.tsx index 4bd3519a27..da6cf25995 100644 --- a/apps/admin-x-activitypub/src/components/ListIndex.tsx +++ b/apps/admin-x-activitypub/src/components/ListIndex.tsx @@ -115,16 +115,6 @@ const ActivityPubComponent: React.FC = () => { { id: 'activity', title: 'Activity', - contents:
- {activities && activities.slice().reverse().map(activity => ( - activity.type === 'Like' && } id='list-item' title={
{activity.actor.name} liked your post {activity.object.name}
}>
- ))} -
-
- }, - { - id: 'likes', - title: 'Likes', contents:
}, + { + id: 'likes', + title: 'Likes', + contents:
+ {activities && activities.slice().reverse().map(activity => ( + activity.type === 'Like' && } id='list-item' title={
{activity.actor.name} liked your post {activity.object.name}
}>
+ ))} +
+
+ }, { id: 'profile', title: 'Profile', @@ -167,7 +167,7 @@ const ActivityPubComponent: React.FC = () => { onClick: () => { setSelectedOption({label: 'Feed', value: 'feed'}); } - + }, { icon: 'cardview', @@ -191,9 +191,9 @@ const ActivityPubComponent: React.FC = () => { tabs={tabs} title='ActivityPub' toolbarBorder={true} - type='page' + type='page' onTabChange={setSelectedTab} - > + > ) : ( @@ -303,7 +303,7 @@ const ObjectContentDisplay: React.FC<{actor: ActorProperties, object: ObjectProp return
; - + case 'audio/mpeg': case 'audio/ogg': return
@@ -319,7 +319,7 @@ const ObjectContentDisplay: React.FC<{actor: ActorProperties, object: ObjectProp const [isClicked, setIsClicked] = useState(false); const [isLiked, setIsLiked] = useState(false); - + const handleLikeClick = (event: React.MouseEvent | undefined) => { event?.stopPropagation(); setIsClicked(true); @@ -397,7 +397,7 @@ const ViewArticle: React.FC = ({object, onBackToList}) => { const [isClicked, setIsClicked] = useState(false); const [isLiked, setIsLiked] = useState(false); - + const handleLikeClick = (event: React.MouseEvent | undefined) => { event?.stopPropagation(); setIsClicked(true); @@ -415,7 +415,7 @@ const ViewArticle: React.FC = ({object, onBackToList}) => {
-
+