File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 1+ // Libraries
12import React , { FC } from 'react'
23import { IconFont } from '@influxdata/clockface'
3- import { OrganizationSummaries , UserAccount } from 'src/client/unityRoutes'
4- import {
5- GlobalHeaderDropdown ,
6- TypeAheadMenuItem ,
7- } from 'src/identity/components/GlobalHeader/GlobalHeaderDropdown'
84
5+ // Types
96type OrgSummaryItem = OrganizationSummaries [ number ]
7+ import { OrganizationSummaries , UserAccount } from 'src/client/unityRoutes'
108
119interface Props {
1210 activeOrg : OrgSummaryItem
1311 activeAccount : UserAccount
1412 accountsList : UserAccount [ ]
1513}
1614
15+ // Styles
1716const style = { width : 'auto' }
1817const menuStyle = { width : '250px' }
1918
19+ // Components
20+ import {
21+ GlobalHeaderDropdown ,
22+ TypeAheadMenuItem ,
23+ } from 'src/identity/components/GlobalHeader/GlobalHeaderDropdown'
24+
25+ // Constants
26+ import { CLOUD_URL } from 'src/shared/constants'
27+
2028export const AccountDropdown : FC < Props > = ( {
2129 activeOrg,
2230 activeAccount,
@@ -42,7 +50,7 @@ export const AccountDropdown: FC<Props> = ({
4250
4351 // Quartz handles switching accounts by having the user hit this URL.
4452 const switchAccount = ( account : TypeAheadMenuItem ) => {
45- window . location . href = `orgs/ ${ activeOrg . id } /accounts/${ account . id } `
53+ window . location . href = `${ CLOUD_URL } /accounts/${ account . id } `
4654 }
4755
4856 return (
Original file line number Diff line number Diff line change 1+ // Libraries
12import React , { FC } from 'react'
2- import { OrganizationSummaries } from 'src/client/unityRoutes'
3+ import { IconFont } from '@influxdata/clockface'
4+
5+ // Components
36import {
47 TypeAheadMenuItem ,
58 GlobalHeaderDropdown ,
69} from 'src/identity/components/GlobalHeader/GlobalHeaderDropdown'
7- import { IconFont } from '@influxdata/clockface'
10+
11+ // Types
12+ import { OrganizationSummaries } from 'src/client/unityRoutes'
13+
14+ // Constants
15+ import { CLOUD_URL } from 'src/shared/constants'
816
917const switchOrg = ( org : TypeAheadMenuItem ) => {
10- window . location . href = `/orgs/${ org . id } `
18+ window . location . href = `${ CLOUD_URL } /orgs/${ org . id } `
1119}
1220
1321type OrgSummaryItem = OrganizationSummaries [ number ]
You can’t perform that action at this time.
0 commit comments