Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

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

* Fixed so that the no company info screen loads when neither address exists
  • Loading branch information
devinbinnie committed Oct 13, 2020
1 parent a0973be commit 9b7d71c
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 9b7d71c

Please sign in to comment.