diff --git a/src/api/hooks/groups/useGroupRelationships.ts b/src/api/hooks/groups/useGroupRelationships.ts index 60598c2cc..c5ba4b7e0 100644 --- a/src/api/hooks/groups/useGroupRelationships.ts +++ b/src/api/hooks/groups/useGroupRelationships.ts @@ -8,7 +8,7 @@ const useGroupRelationships = (listKey: string[], ids: string[]) => { const { isLoggedIn } = useLoggedIn(); const fetchGroupRelationships = (ids: string[]) => - api('/api/v1/groups/relationships', { params: { ids } }); + api('/api/v1/groups/relationships', { params: { id: ids } }); const { entityMap: relationships, ...result } = useBatchedEntities( [Entities.RELATIONSHIPS, ...listKey], diff --git a/src/components/groups/popover/group-popover.tsx b/src/components/groups/popover/group-popover.tsx index c9ecbba68..17c03c30b 100644 --- a/src/components/groups/popover/group-popover.tsx +++ b/src/components/groups/popover/group-popover.tsx @@ -30,7 +30,7 @@ const GroupPopover = (props: IGroupPopoverContainer) => { const path = history.location.pathname; const shouldHideAction = matchPath(path, { - path: ['/group/:groupId'], + path: ['/groups/:groupId'], exact: true, }); @@ -88,7 +88,7 @@ const GroupPopover = (props: IGroupPopoverContainer) => { {!shouldHideAction && (
- + diff --git a/src/components/status-action-bar.tsx b/src/components/status-action-bar.tsx index 732b8cf7b..6b96b125d 100644 --- a/src/components/status-action-bar.tsx +++ b/src/components/status-action-bar.tsx @@ -119,7 +119,7 @@ const StatusActionBar: React.FC = ({ const intl = useIntl(); const history = useHistory(); const dispatch = useAppDispatch(); - const match = useRouteMatch<{ groupId: string }>('/group/:groupId'); + const match = useRouteMatch<{ groupId: string }>('/groups/:groupId'); const { group } = useGroup((status.group as Group)?.id as string); const deleteGroupStatus = useDeleteGroupStatus(group as Group, status.id); diff --git a/src/components/status.tsx b/src/components/status.tsx index 21a0ba989..f8f945287 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -223,7 +223,7 @@ const Status: React.FC = (props) => { ), group: ( - + = (props) => { defaultMessage='Posted in {group}' values={{ group: ( - + diff --git a/src/features/compose/components/reply-group-indicator.tsx b/src/features/compose/components/reply-group-indicator.tsx index 75038d9b3..77cca5725 100644 --- a/src/features/compose/components/reply-group-indicator.tsx +++ b/src/features/compose/components/reply-group-indicator.tsx @@ -30,7 +30,7 @@ const ReplyGroupIndicator = (props: IReplyGroupIndicator) => { defaultMessage='Posting to {groupLink}' values={{ groupLink: , }} diff --git a/src/features/group/components/group-action-button.tsx b/src/features/group/components/group-action-button.tsx index 63e46b03c..c456b935c 100644 --- a/src/features/group/components/group-action-button.tsx +++ b/src/features/group/components/group-action-button.tsx @@ -83,7 +83,7 @@ const GroupActionButton = ({ group }: IGroupActionButton) => { return ( diff --git a/src/features/group/components/group-header.tsx b/src/features/group/components/group-header.tsx index a24a71226..6275595bc 100644 --- a/src/features/group/components/group-header.tsx +++ b/src/features/group/components/group-header.tsx @@ -143,7 +143,7 @@ const GroupHeader: React.FC = ({ group }) => { - 4 + diff --git a/src/features/group/components/group-member-count.tsx b/src/features/group/components/group-member-count.tsx index 066f0fecb..626b0b282 100644 --- a/src/features/group/components/group-member-count.tsx +++ b/src/features/group/components/group-member-count.tsx @@ -11,7 +11,7 @@ interface IGroupMemberCount { } const GroupMemberCount = ({ group }: IGroupMemberCount) => ( - + {shortNumberFormat(group.members_count)} {' '} diff --git a/src/features/group/group-blocked-members.tsx b/src/features/group/group-blocked-members.tsx index f67f3deca..ce9efabdd 100644 --- a/src/features/group/group-blocked-members.tsx +++ b/src/features/group/group-blocked-members.tsx @@ -82,7 +82,7 @@ const GroupBlockedMembers: React.FC = ({ params }) => { const emptyMessage = ; return ( - + = (props) => { prepend={(pendingCount > 0) && (
diff --git a/src/features/group/manage-group.tsx b/src/features/group/manage-group.tsx index c7eb6cd87..740759a99 100644 --- a/src/features/group/manage-group.tsx +++ b/src/features/group/manage-group.tsx @@ -74,7 +74,7 @@ const ManageGroup: React.FC = ({ params }) => { })); return ( - + {isOwner && ( <> @@ -83,7 +83,7 @@ const ManageGroup: React.FC = ({ params }) => { - + @@ -95,9 +95,9 @@ const ManageGroup: React.FC = ({ params }) => { - + - + {isOwner && ( diff --git a/src/features/groups/components/discover/group-list-item.tsx b/src/features/groups/components/discover/group-list-item.tsx index c24b084f1..ecd565d1b 100644 --- a/src/features/groups/components/discover/group-list-item.tsx +++ b/src/features/groups/components/discover/group-list-item.tsx @@ -22,7 +22,7 @@ const GroupListItem = (props: IGroupListItem) => { justifyContent='between' data-testid='group-list-item' > - + { hasMore={hasNextPage} > {groups.map((group) => ( - + ))} diff --git a/src/features/status/components/detailed-status.tsx b/src/features/status/components/detailed-status.tsx index 1da5d28f3..1305f9013 100644 --- a/src/features/status/components/detailed-status.tsx +++ b/src/features/status/components/detailed-status.tsx @@ -64,7 +64,7 @@ const DetailedStatus: React.FC = ({ defaultMessage='Posted in {group}' values={{ group: ( - + diff --git a/src/features/status/index.tsx b/src/features/status/index.tsx index 4c390bc5f..738910e78 100644 --- a/src/features/status/index.tsx +++ b/src/features/status/index.tsx @@ -88,7 +88,7 @@ const StatusDetails: React.FC = (props) => { if (status.group && typeof status.group === 'object') { if (status.group.id && !props.params.groupId) { - return ; + return ; } } diff --git a/src/features/ui/components/compose-button.tsx b/src/features/ui/components/compose-button.tsx index ea002b795..1994899bd 100644 --- a/src/features/ui/components/compose-button.tsx +++ b/src/features/ui/components/compose-button.tsx @@ -11,7 +11,7 @@ import { useAppDispatch } from 'soapbox/hooks'; const ComposeButton = () => { const location = useLocation(); const isOnGroupPage = location.pathname.startsWith('/group/'); - const match = useRouteMatch<{ groupId: string }>('/group/:groupId'); + const match = useRouteMatch<{ groupId: string }>('/groups/:groupId'); const { group } = useGroup(match?.params.groupId || ''); const isGroupMember = !!group?.relationship?.member; @@ -40,7 +40,7 @@ const HomeComposeButton = () => { const GroupComposeButton = () => { const dispatch = useAppDispatch(); - const match = useRouteMatch<{ groupId: string }>('/group/:groupId'); + const match = useRouteMatch<{ groupId: string }>('/groups/:groupId'); const { group } = useGroup(match?.params.groupId || ''); if (!group) return null; diff --git a/src/features/ui/components/floating-action-button.tsx b/src/features/ui/components/floating-action-button.tsx index 80bd0d830..1254d7d5a 100644 --- a/src/features/ui/components/floating-action-button.tsx +++ b/src/features/ui/components/floating-action-button.tsx @@ -53,7 +53,7 @@ const GroupFAB: React.FC = () => { const intl = useIntl(); const dispatch = useAppDispatch(); - const match = useRouteMatch<{ groupId: string }>('/group/:groupId'); + const match = useRouteMatch<{ groupId: string }>('/groups/:groupId'); const { group } = useGroup(match?.params.groupId || ''); if (!group) return null; diff --git a/src/pages/group-page.tsx b/src/pages/group-page.tsx index 20cebc637..0a10e427f 100644 --- a/src/pages/group-page.tsx +++ b/src/pages/group-page.tsx @@ -62,20 +62,20 @@ const GroupPage: React.FC = ({ params, children }) => { const items = []; items.push({ text: intl.formatMessage(messages.all), - to: `/group/${id}`, - name: '/group/:groupId', + to: `/groups/${id}`, + name: '/groups/:groupId', }); items.push( { text: intl.formatMessage(messages.media), - to: `/group/${id}/media`, - name: '/group/:groupId/media', + to: `/groups/${id}/media`, + name: '/groups/:groupId/media', }, { text: intl.formatMessage(messages.members), - to: `/group/${id}/members`, - name: '/group/:groupId/members', + to: `/groups/${id}/members`, + name: '/groups/:groupId/members', count: pending.length, }, );