Skip to content
Snippets Groups Projects

Remove unused 'hideProjects' prop and its related refs

Merged Anwar Sadath requested to merge gitlab-community/gitlab:remove-hideProjects-ref into master
All threads resolved!
Files
3
@@ -3,10 +3,11 @@ import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils';
import { getGroupItemMicrodata } from './utils';
export default class GroupsStore {
constructor({ showSchemaMarkup = false } = {}) {
constructor({ hideProjects = false, showSchemaMarkup = false } = {}) {
this.state = {};
this.state.groups = [];
this.state.pageInfo = {};
this.hideProjects = hideProjects;
this.showSchemaMarkup = showSchemaMarkup;
}
@@ -66,7 +67,9 @@ export default class GroupsStore {
formatGroupItem(rawGroupItem) {
const groupChildren = rawGroupItem.children || [];
const groupIsOpen = groupChildren.length > 0 || false;
const childrenCount = rawGroupItem.subgroup_count;
const childrenCount = this.hideProjects
? rawGroupItem.subgroup_count
: rawGroupItem.children_count;
const groupItem = {
id: rawGroupItem.id,
Loading