From 19ed36b949f797a20e784b7c52cab6262bc852ee Mon Sep 17 00:00:00 2001 From: Kyr <40792129+khudym@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:57:00 +0200 Subject: [PATCH] fix: [AXIMST-657] Certificates page - update condition to show header buttons (#205) * feat: [AXIMST-605] add file name to upload preview modal (#203) * fix: [AXIMST-657] Certificates update condition to show header buttons --------- Co-authored-by: vladislavkeblysh <138868841+vladislavkeblysh@users.noreply.github.com> Co-authored-by: Kyrylo Hudym-Levkovych --- src/certificates/Certificates.jsx | 4 ++-- src/certificates/hooks/useCertificates.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/certificates/Certificates.jsx b/src/certificates/Certificates.jsx index 9650ba9a4e..f0afa2ef4d 100644 --- a/src/certificates/Certificates.jsx +++ b/src/certificates/Certificates.jsx @@ -22,7 +22,7 @@ const MODE_COMPONENTS = { const Certificates = ({ courseId }) => { const { - certificates, componentMode, isLoading, loadingStatus, + certificates, componentMode, isLoading, loadingStatus, hasCertificateModes, } = useCertificates({ courseId }); if (isLoading) { @@ -40,7 +40,7 @@ const Certificates = ({ courseId }) => { const ModeComponent = MODE_COMPONENTS[componentMode] || MODE_COMPONENTS[MODE_STATES.noModes]; return ( - 0}> + 0}> ); diff --git a/src/certificates/hooks/useCertificates.jsx b/src/certificates/hooks/useCertificates.jsx index 06076a0b1f..2f51e0319e 100644 --- a/src/certificates/hooks/useCertificates.jsx +++ b/src/certificates/hooks/useCertificates.jsx @@ -42,7 +42,7 @@ const useCertificates = ({ courseId }) => { document.title = getPageHeadTitle(courseTitle, intl.formatMessage(messages.headingTitleTabText)); return { - componentMode, isLoading, loadingStatus, certificates, + componentMode, isLoading, loadingStatus, certificates, hasCertificateModes, }; };