Skip to content

Commit

Permalink
chore: remove check for 10<groups on add
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Oct 31, 2024
1 parent 14fc1f7 commit b800038
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions src/components/Organizations/Groups/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DELETE_GROUP = gql`
/**
* The primary list of groups.
*/
const Groups = ({ groups = [], organizationId, organizationName, ableToAddGroup, refetch, orgFriendlyName }) => {
const Groups = ({ groups = [], organizationId, organizationName, refetch, orgFriendlyName }) => {
const [modalStates, setModalStates] = useState({
addUser: {
open: false,
Expand Down Expand Up @@ -210,7 +210,6 @@ const Groups = ({ groups = [], organizationId, organizationName, ableToAddGroup,
labelText="Groups"
/>
<NewGroup
disabled={!ableToAddGroup}
organizationId={organizationId}
onGroupAdded={refetch}
existingGroupNames={groups.map(g => g.name)}
Expand Down
4 changes: 0 additions & 4 deletions src/pages/organizations/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ export const PageGroups = ({ router }) => {
return <OrganizationNotFound variables={{ name: router.query.organizationSlug }} />;
}

// disable adding new groups if non-default groups count is 10
const ableToAddGroup = organization.groups.filter(group => group.type !== 'project-default-group').length < 10;

return (
<>
<Head>
Expand All @@ -89,7 +86,6 @@ export const PageGroups = ({ router }) => {
organizationId={organization.id}
organizationName={organization.name}
orgFriendlyName={organization.friendlyName}
ableToAddGroup={ableToAddGroup}
refetch={handleRefetch}
/>
</OrganizationsWrapper>
Expand Down

0 comments on commit b800038

Please sign in to comment.