-
-
- {group.name}
-
- |
- |
- {FirstNameLastInitial(group.ownerName)} |
- {group.memberCount} |
-
-
- {(group.role === 'owner' || group.role === 'manager') && (
-
- )}
- {(group.role === 'member' || group.role === 'manager') && (
-
- )}
- {group.role === 'owner' && (
- <>
-
- {
- setPageLoading(true);
- event.target.setAttribute('disabled', 'true');
- deleteGroupById(group.id).then(() => {
- setGroups(groups.filter((g) => g.id !== group.id));
- setAlerts((prevState) => [...prevState, {
- text: 'You have successfully deleted the group.',
- variant: 'warning',
- }]);
- setPageLoading(false);
- }).catch((err) => {
- setAlerts((prevState) => [...prevState, { text: err.message, variant: 'danger' }]);
- setPageLoading(false);
- });
- handleCloseModal();
- }}
- />
- >
- )}
-
- |
-
- ))}
-