Fix: no organization name visible in single workspace (#5256)

This commit is contained in:
Muhsin Shah C P 2023-01-09 13:23:20 +05:30 committed by GitHub
parent e091e5c662
commit 84e603124d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,17 +2,23 @@ import React from 'react';
import cx from 'classnames';
import Breadcrumbs from '../Breadcrumbs';
import { OrganizationList } from '@/_components/OrganizationManager/List';
import { authenticationService } from '@/_services';
function Header() {
const currentVersion = localStorage.getItem('currentVersion');
const darkMode = localStorage.getItem('darkMode') === 'true';
const isSingleOrganization = window.public_config?.DISABLE_MULTI_WORKSPACE === 'true';
const { organization } = authenticationService.currentUserValue;
return (
<header className="layout-header">
<div className="row w-100 gx-0">
<div className="organization-selector col border-end border-bottom">
{!isSingleOrganization && <OrganizationList />}
{isSingleOrganization ? (
<span className="d-flex align-items-center h-100">{organization}</span>
) : (
<OrganizationList />
)}
</div>
<div className="col border-bottom m-auto" style={{ padding: 13.5 }}>
<div className="d-flex justify-content-sm-between">