@boomerang-io/carbon-addons-boomerang-react 4.6.14-beta.2 → 4.6.14-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,7 +136,15 @@ function HeaderTeamSwitcher({ analyticsHelpers, baseServicesUrl, createJoinTeamT
136
136
  }
137
137
  // if teams data loaded but there are no teams
138
138
  }
139
- else if (Boolean(userTeams?.data) || Boolean(teamsQuery?.data)) {
139
+ else if (Boolean(userTeamInstanceSwitcherDefault) &&
140
+ ((hasUserTeams &&
141
+ userTeams?.data?.accountTeams?.length === 0 &&
142
+ userTeams?.data?.standardTeams?.length === 0 &&
143
+ userTeams?.data?.personalTeam?.length === 0) ||
144
+ (!hasUserTeams &&
145
+ teamsQuery?.data?.accountTeams?.length === 0 &&
146
+ teamsQuery?.data?.standardTeams?.length === 0 &&
147
+ teamsQuery?.data?.personalTeam?.length === 0))) {
140
148
  handleNoTeamsToSelect();
141
149
  }
142
150
  }, [
@@ -144,12 +152,10 @@ function HeaderTeamSwitcher({ analyticsHelpers, baseServicesUrl, createJoinTeamT
144
152
  hasUserTeams,
145
153
  mutateUserProfile,
146
154
  selectedTeam,
147
- teamsQuery?.data,
148
155
  teamsQuery?.data?.accountTeams,
149
156
  teamsQuery?.data?.personalTeam,
150
157
  teamsQuery?.data?.standardTeams,
151
158
  userTeamInstanceSwitcherDefault,
152
- userTeams?.data,
153
159
  userTeams?.data?.accountTeams,
154
160
  userTeams?.data?.personalTeam,
155
161
  userTeams?.data?.standardTeams,
@@ -127,7 +127,15 @@ function HeaderTeamSwitcher({ analyticsHelpers, baseServicesUrl, createJoinTeamT
127
127
  }
128
128
  // if teams data loaded but there are no teams
129
129
  }
130
- else if (Boolean(userTeams?.data) || Boolean(teamsQuery?.data)) {
130
+ else if (Boolean(userTeamInstanceSwitcherDefault) &&
131
+ ((hasUserTeams &&
132
+ userTeams?.data?.accountTeams?.length === 0 &&
133
+ userTeams?.data?.standardTeams?.length === 0 &&
134
+ userTeams?.data?.personalTeam?.length === 0) ||
135
+ (!hasUserTeams &&
136
+ teamsQuery?.data?.accountTeams?.length === 0 &&
137
+ teamsQuery?.data?.standardTeams?.length === 0 &&
138
+ teamsQuery?.data?.personalTeam?.length === 0))) {
131
139
  handleNoTeamsToSelect();
132
140
  }
133
141
  }, [
@@ -135,12 +143,10 @@ function HeaderTeamSwitcher({ analyticsHelpers, baseServicesUrl, createJoinTeamT
135
143
  hasUserTeams,
136
144
  mutateUserProfile,
137
145
  selectedTeam,
138
- teamsQuery?.data,
139
146
  teamsQuery?.data?.accountTeams,
140
147
  teamsQuery?.data?.personalTeam,
141
148
  teamsQuery?.data?.standardTeams,
142
149
  userTeamInstanceSwitcherDefault,
143
- userTeams?.data,
144
150
  userTeams?.data?.accountTeams,
145
151
  userTeams?.data?.personalTeam,
146
152
  userTeams?.data?.standardTeams,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@boomerang-io/carbon-addons-boomerang-react",
3
3
  "description": "Carbon Addons for Boomerang apps",
4
- "version": "4.6.14-beta.2",
4
+ "version": "4.6.14-beta.4",
5
5
  "author": {
6
6
  "name": "Tim Bula",
7
7
  "email": "timrbula@gmail.com"