From 2fb4d83b5a2c259aac76541a02eddcdc41ce4837 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Fri, 4 Oct 2024 11:28:04 +0700 Subject: [PATCH] Remove usage of `useSiteUrl` from Activities component refs https://linear.app/tryghost/issue/AP-469 This takes advantage of the new criteria in the API so that we don't have to use the problematic useSiteUrl. --- apps/admin-x-activitypub/src/components/Activities.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/admin-x-activitypub/src/components/Activities.tsx b/apps/admin-x-activitypub/src/components/Activities.tsx index c1dd96190b..3ef64477a0 100644 --- a/apps/admin-x-activitypub/src/components/Activities.tsx +++ b/apps/admin-x-activitypub/src/components/Activities.tsx @@ -10,7 +10,7 @@ import FollowButton from './global/FollowButton'; import MainNavigation from './navigation/MainNavigation'; import getUsername from '../utils/get-username'; -import {useActivitiesForUser, useSiteUrl} from '../hooks/useActivityPubQueries'; +import {useActivitiesForUser} from '../hooks/useActivityPubQueries'; import {useFollowersForUser} from '../MainContent'; interface ActivitiesProps {} @@ -86,7 +86,6 @@ const getActivityBadge = (activity: Activity): AvatarBadge => { const Activities: React.FC = ({}) => { const user = 'index'; - const siteUrl = useSiteUrl(); const { data, @@ -98,7 +97,7 @@ const Activities: React.FC = ({}) => { includeOwn: true, includeReplies: true, filter: { - type: ['Follow', 'Like', `Create:Note:isReplyToOwn,${new URL(siteUrl).hostname}`] + type: ['Follow', 'Like', `Create:Note:isReplyToOwn`] } });