File tree Expand file tree Collapse file tree 2 files changed +24
-20
lines changed
webview-ui/src/components/cloud Expand file tree Collapse file tree 2 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -149,16 +149,18 @@ export const CloudAccountSwitcher = () => {
149149 </ SelectItem >
150150 ) ) }
151151
152- { /* Add separator before Create Team Account option */ }
153- < SelectSeparator />
154-
155- { /* Create Team Account Option */ }
156- < SelectItem value = "create-team" >
157- < div className = "flex items-center gap-2" >
158- < Plus className = "w-4.5 h-4.5" />
159- < span > { t ( "cloud:createTeamAccount" ) } </ span >
160- </ div >
161- </ SelectItem >
152+ { /* Only show Create Team Account if user has no organizations */ }
153+ { cloudOrganizations . length === 0 && (
154+ < >
155+ < SelectSeparator />
156+ < SelectItem value = "create-team" >
157+ < div className = "flex items-center gap-2" >
158+ < Plus className = "w-4.5 h-4.5" />
159+ < span > { t ( "cloud:createTeamAccount" ) } </ span >
160+ </ div >
161+ </ SelectItem >
162+ </ >
163+ ) }
162164 </ SelectContent >
163165 </ Select >
164166 </ div >
Original file line number Diff line number Diff line change @@ -152,16 +152,18 @@ export const OrganizationSwitcher = ({
152152 </ SelectItem >
153153 ) ) }
154154
155- { /* Add separator before Create Team Account option */ }
156- < SelectSeparator />
157-
158- { /* Create Team Account Option */ }
159- < SelectItem value = "create-team" >
160- < div className = "flex items-center gap-2" >
161- < Plus className = "w-4.5 h-4.5" />
162- < span > { t ( "cloud:createTeamAccount" ) } </ span >
163- </ div >
164- </ SelectItem >
155+ { /* Only show Create Team Account if user has no organizations */ }
156+ { organizations . length === 0 && (
157+ < >
158+ < SelectSeparator />
159+ < SelectItem value = "create-team" >
160+ < div className = "flex items-center gap-2" >
161+ < Plus className = "w-4.5 h-4.5" />
162+ < span > { t ( "cloud:createTeamAccount" ) } </ span >
163+ </ div >
164+ </ SelectItem >
165+ </ >
166+ ) }
165167 </ SelectContent >
166168 </ Select >
167169 </ div >
You can’t perform that action at this time.
0 commit comments