From 231d94911a39d710ce202b8524e908384e96f9d3 Mon Sep 17 00:00:00 2001 From: Adam Butterworth Date: Mon, 11 Mar 2019 11:17:22 -0400 Subject: [PATCH] fix: Add edit button to empty state on certs (#68) --- package-lock.json | 2 +- src/components/ProfilePage/Certificates.jsx | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 987bfbe..762d726 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2442,7 +2442,7 @@ "integrity": "sha512-APBpZvdQrC1MJWMzk33V7FR2RhBRtnH2QPLqZzS+qia7PixwgWNlnX7UfHjhx+YWkM53GdsZKs40EBkSwADuMA==" }, "@edx/edx-bootstrap": { - "version": "git://github.com/edx/edx-bootstrap.git#bd2f0bb753d2b654ff3da154c1c346951142644b", + "version": "git://github.com/edx/edx-bootstrap.git#71fd3272d235eb133cccefc1ce63f35a7696bf28", "from": "git://github.com/edx/edx-bootstrap.git#update-with-documentation-site", "requires": { "@fortawesome/fontawesome-svg-core": "^1.2.13", diff --git a/src/components/ProfilePage/Certificates.jsx b/src/components/ProfilePage/Certificates.jsx index c0ca50b..39ecb03 100644 --- a/src/components/ProfilePage/Certificates.jsx +++ b/src/components/ProfilePage/Certificates.jsx @@ -94,8 +94,12 @@ class Certificates extends React.Component { } renderCertificates() { - if (this.props.certificates === null) { - return null; + if (this.props.certificates === null || this.props.certificates.length === 0) { + return (); } return ( @@ -145,11 +149,14 @@ class Certificates extends React.Component { ), empty: (
- + {this.renderCertificates()}
), static: (