Fix bug with slug in Group Media

This commit is contained in:
Chewbacca 2023-04-18 12:03:42 -04:00
parent 768fa1c4eb
commit 0f29c5673c

View file

@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import { useParams } from 'react-router-dom';
import { openModal } from 'soapbox/actions/modals'; import { openModal } from 'soapbox/actions/modals';
import LoadMore from 'soapbox/components/load-more'; 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'; import type { Attachment, Status } from 'soapbox/types/entities';
const GroupGallery = () => { interface IGroupGallery {
const dispatch = useAppDispatch(); params: { groupId: string }
}
const { groupId } = useParams<{ groupId: string }>(); const GroupGallery: React.FC<IGroupGallery> = (props) => {
const { groupId } = props.params;
const dispatch = useAppDispatch();
const { group, isLoading: groupIsLoading } = useGroup(groupId); const { group, isLoading: groupIsLoading } = useGroup(groupId);