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.
This commit is contained in:
Fabien O'Carroll 2024-10-04 11:28:04 +07:00 committed by Fabien 'egg' O'Carroll
parent 5bdfac4e1f
commit 2fb4d83b5a

View File

@ -10,7 +10,7 @@ import FollowButton from './global/FollowButton';
import MainNavigation from './navigation/MainNavigation'; import MainNavigation from './navigation/MainNavigation';
import getUsername from '../utils/get-username'; import getUsername from '../utils/get-username';
import {useActivitiesForUser, useSiteUrl} from '../hooks/useActivityPubQueries'; import {useActivitiesForUser} from '../hooks/useActivityPubQueries';
import {useFollowersForUser} from '../MainContent'; import {useFollowersForUser} from '../MainContent';
interface ActivitiesProps {} interface ActivitiesProps {}
@ -86,7 +86,6 @@ const getActivityBadge = (activity: Activity): AvatarBadge => {
const Activities: React.FC<ActivitiesProps> = ({}) => { const Activities: React.FC<ActivitiesProps> = ({}) => {
const user = 'index'; const user = 'index';
const siteUrl = useSiteUrl();
const { const {
data, data,
@ -98,7 +97,7 @@ const Activities: React.FC<ActivitiesProps> = ({}) => {
includeOwn: true, includeOwn: true,
includeReplies: true, includeReplies: true,
filter: { filter: {
type: ['Follow', 'Like', `Create:Note:isReplyToOwn,${new URL(siteUrl).hostname}`] type: ['Follow', 'Like', `Create:Note:isReplyToOwn`]
} }
}); });