Skip to content

Commit

Permalink
[MM-29559][MM-29558] Company Info Fixes (mattermost#6764) (mattermost…
Browse files Browse the repository at this point in the history
…#6767)

* [MM-29559][MM-29558] Company Info Fixes

* Fixed so that the no company info screen loads when neither address exists

(cherry picked from commit 9b7d71c)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
  • Loading branch information
mattermost-build and devinbinnie committed Oct 13, 2020
1 parent 5ea49bc commit e25227a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/admin_console/billing/company_info_display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ const noCompanyInfoSection = (
const CompanyInfoDisplay: React.FC = () => {
const companyInfo = useSelector((state: GlobalState) => state.entities.cloud.customer);

let body = noCompanyInfoSection;
if (!companyInfo) {
return null;
}

if (companyInfo) {
const address = companyInfo.company_address || companyInfo.billing_address;
let body = noCompanyInfoSection;
const address = companyInfo.company_address.line1 ? companyInfo.company_address : companyInfo.billing_address;
if (address.line1) {
body = (
<div className='CompanyInfoDisplay__companyInfo'>
<div className='CompanyInfoDisplay__companyInfo-text'>
Expand Down

0 comments on commit e25227a

Please sign in to comment.