From 3cbc8f67bd4e065ace4bd30053704671193100ae Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Fri, 11 Jun 2021 12:15:27 -0700 Subject: [PATCH] Random fixes (#19867) * fix introLinks rendering to show primary button * fix LearningTrack text overflow issue --- components/landing/LandingHero.tsx | 45 +++++++------------------ components/sublanding/LearningTrack.tsx | 2 +- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/components/landing/LandingHero.tsx b/components/landing/LandingHero.tsx index 56f0299cee..ef169f6752 100644 --- a/components/landing/LandingHero.tsx +++ b/components/landing/LandingHero.tsx @@ -33,44 +33,23 @@ export const LandingHero = () => { dangerouslySetInnerHTML={{ __html: intro }} /> - {/* idea to abstract the introLinks into something more component-like */} - {/* {introLinks.map((link) => { + {introLinks && + Object.entries(introLinks).filter(([key, link])=> { + return link && !key.includes('raw') + }).map(([key, link], i) => { + if (!link) { + return null + } return ( - {t(link.translationKeyLabel)} + {t(key)} ) - })} */} - - {introLinks?.quickstart && ( - - {t('quickstart')} - - )} - - {introLinks?.reference && ( - - {t('reference')} - - )} - - {introLinks?.overview && ( - - {t('overview')} - - )} + })} {product_video && ( diff --git a/components/sublanding/LearningTrack.tsx b/components/sublanding/LearningTrack.tsx index c1c59f59a4..5341ca0c86 100644 --- a/components/sublanding/LearningTrack.tsx +++ b/components/sublanding/LearningTrack.tsx @@ -52,7 +52,7 @@ export const LearningTrack = ({ track }: Props) => { )}
{guide.title}
-
+
{t('guide_types')[guide.page.type]}