From 0f29c5673cb205cc596f038698677de5c251076c Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Tue, 18 Apr 2023 12:03:42 -0400 Subject: [PATCH] Fix bug with slug in Group Media --- app/soapbox/features/group/group-gallery.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/soapbox/features/group/group-gallery.tsx b/app/soapbox/features/group/group-gallery.tsx index f8a259e50..f5b1164e7 100644 --- a/app/soapbox/features/group/group-gallery.tsx +++ b/app/soapbox/features/group/group-gallery.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { useParams } from 'react-router-dom'; import { openModal } from 'soapbox/actions/modals'; import LoadMore from 'soapbox/components/load-more'; @@ -13,10 +12,14 @@ import MediaItem from '../account-gallery/components/media-item'; import type { Attachment, Status } from 'soapbox/types/entities'; -const GroupGallery = () => { - const dispatch = useAppDispatch(); +interface IGroupGallery { + params: { groupId: string } +} - const { groupId } = useParams<{ groupId: string }>(); +const GroupGallery: React.FC = (props) => { + const { groupId } = props.params; + + const dispatch = useAppDispatch(); const { group, isLoading: groupIsLoading } = useGroup(groupId);