fix(ui): fix appearance of org names in page titles (#16471)

pull/16523/head
alexpaxton 2020-01-15 01:21:30 +07:00 committed by Alex Boatwright
parent f3bb6ff042
commit 10b033cd9f
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import {get} from 'lodash'
import {getOrg} from 'src/organizations/selectors'
import {store} from 'src/index'
export const pageTitleSuffixer = (pageTitles: string[]): string => {
const state = store.getState()
const currentOrg = get(state, 'orgs.org.name', '')
const titles = [...pageTitles, currentOrg, 'InfluxDB 2.0']
const {name} = getOrg(state) || null
const titles = [...pageTitles, name, 'InfluxDB 2.0']
return titles.join(' | ')
}