From 733d0b7bedf11748fab04a62c799cbbc9b83e38c Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:56:34 +0700 Subject: [PATCH 1/2] feat(client): point claim cert links to corresponding sections on /settings (#54163) --- .../src/components/settings/certification.tsx | 109 +++++++++--------- .../components/cert-challenge.tsx | 2 +- .../show-cert-from-superblock.ts | 7 +- 3 files changed, 60 insertions(+), 58 deletions(-) diff --git a/client/src/components/settings/certification.tsx b/client/src/components/settings/certification.tsx index 59e9d3e4c80dfb..c158f00c4306cb 100644 --- a/client/src/components/settings/certification.tsx +++ b/client/src/components/settings/certification.tsx @@ -334,26 +334,30 @@ function CertificationSettings(props: CertificationSettingsProps) { }) => { const { certSlug } = certsToProjects[certName][0]; return ( - - -

- {t(`certification.title.${certName}`, certName)} -

- - - - - - - - - - -
{t('settings.labels.project-name')}{t('settings.labels.solution')}
-
+ +
+ + +

+ {t(`certification.title.${certName}`, certName)} +

+ + + + + + + + + + +
{t('settings.labels.project-name')}{t('settings.labels.solution')}
+
+
+
); }; @@ -413,43 +417,38 @@ function CertificationSettings(props: CertificationSettingsProps) { const { t } = props; return ( - -
- {t('settings.headings.certs')} - {currentCertTitles.map(title => ( - - ))} - - {t('settings.headings.legacy-certs')} - - {legacyCertTitles.map(title => ( +
+ {t('settings.headings.certs')} + {currentCertTitles.map(title => ( + + ))} + + {t('settings.headings.legacy-certs')} + + {legacyCertTitles.map(title => ( + + ))} + {showUpcomingChanges && + upcomingCertTitles.map(title => ( ))} - {showUpcomingChanges && - upcomingCertTitles.map(title => ( - - ))} - - - -
- + + + +
); } diff --git a/client/src/templates/Introduction/components/cert-challenge.tsx b/client/src/templates/Introduction/components/cert-challenge.tsx index 7f92b7e8a95aec..ec086d42dab29d 100644 --- a/client/src/templates/Introduction/components/cert-challenge.tsx +++ b/client/src/templates/Introduction/components/cert-challenge.tsx @@ -129,7 +129,7 @@ const CertChallenge = ({