From cc3585f319c2381a49f7ca462205c9bbfc4f02c7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 20 Mar 2023 21:52:44 -0500 Subject: [PATCH] Manage group: add headers --- app/soapbox/features/group/manage-group.tsx | 38 ++++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/app/soapbox/features/group/manage-group.tsx b/app/soapbox/features/group/manage-group.tsx index 384b2f8883..4fe027ee85 100644 --- a/app/soapbox/features/group/manage-group.tsx +++ b/app/soapbox/features/group/manage-group.tsx @@ -5,7 +5,7 @@ import { useHistory } from 'react-router-dom'; import { deleteGroup, editGroup } from 'soapbox/actions/groups'; import { openModal } from 'soapbox/actions/modals'; import List, { ListItem } from 'soapbox/components/list'; -import { CardBody, Column, Spinner, Text } from 'soapbox/components/ui'; +import { CardBody, CardHeader, CardTitle, Column, Spinner, Text } from 'soapbox/components/ui'; import { useAppDispatch, useGroup } from 'soapbox/hooks'; import ColumnForbidden from '../ui/components/column-forbidden'; @@ -21,6 +21,8 @@ const messages = defineMessages({ deleteConfirm: { id: 'confirmations.delete_group.confirm', defaultMessage: 'Delete' }, deleteHeading: { id: 'confirmations.delete_group.heading', defaultMessage: 'Delete group' }, deleteMessage: { id: 'confirmations.delete_group.message', defaultMessage: 'Are you sure you want to delete this group? This is a permanent action that cannot be undone.' }, + members: { id: 'group.tabs.members', defaultMessage: 'Members' }, + other: { id: 'settings.other', defaultMessage: 'Other options' }, }); interface IManageGroup { @@ -66,20 +68,38 @@ const ManageGroup: React.FC = ({ params }) => { {group.relationship.role === 'owner' && ( - - - - - + <> + + + + + + + + + + )} + + + + + + {group.relationship.role === 'owner' && ( - - {intl.formatMessage(messages.deleteGroup)}} onClick={onDeleteGroup} /> - + <> + + + + + + {intl.formatMessage(messages.deleteGroup)}} onClick={onDeleteGroup} /> + + )}