diff --git a/packages/nulp_elite/src/pages/profile/certificate.js b/packages/nulp_elite/src/pages/profile/certificate.js index 160f6da5..86f1ba5a 100644 --- a/packages/nulp_elite/src/pages/profile/certificate.js +++ b/packages/nulp_elite/src/pages/profile/certificate.js @@ -93,7 +93,6 @@ const Certificate = () => { const url = `${urlConfig.URLS.LEARNER_PREFIX}${urlConfig.URLS.CERTIFICATE.CERTIF_SEARCH}`; const response = await axios.post(url, request); const data = response.data; - setOtherCertData(data); } catch (error) { console.error("Error fetching user data:", error); @@ -280,7 +279,7 @@ const Certificate = () => { fontWeight: "600", }} > - {certificate?._source?.data?.badge?.name} + {certificate._source.data.badge.name} { style={{ fontSize: "12px" }} > {t("CERTIFICATE_GIVEN_BY")}:{" "} - {certificate?._source?.data?.badge?.issuer?.name} + {certificate._source.data.badge.issuer.name} { style={{ fontSize: "12px" }} > {t("CERTIFICATE_ISSUE_DATE")}:{" "} - {formatDate(certificate?._source?.data?.issuedOn)} + {formatDate(certificate._source.data.issuedOn)} { > { }} onClick={() => { getCertificateReport( - certificate?._id, - certificate?._source?.data?.badge?.name + certificate._id, + certificate._source.data.badge.name ); }} > @@ -332,7 +331,7 @@ const Certificate = () => { ))} {otherCertData.map((certificate) => ( - + { border: "solid 1px #EFEFEF", boxShadow: "none", color: "#484848", - position: 'relative', }} > - {certificate?.training?.type && ( - - {certificate?.training?.type} - - )} - { paddingBottom: "0", height: "42px", fontWeight: "600", - marginTop : "27px" }} > - {certificate?.training?.name} + {certificate.training.name} { component="div" style={{ fontSize: "12px" }} > - {t("CERTIFICATE_GIVEN_BY")}: {certificate?.issuer?.name} + {t("CERTIFICATE_GIVEN_BY")}: {certificate.issuer.name} { style={{ fontSize: "12px" }} > {t("CERTIFICATE_ISSUE_DATE")}:{" "} - {formatDate(certificate?.osCreatedAt)} + {formatDate(certificate.osCreatedAt)} { className="text-green" onClick={() => { getCertificate( - certificate?.templateUrl, - certificate?.osid, - certificate?.training?.name + certificate.templateUrl, + certificate.osid, + certificate.training.name ); }} >