* updating sublanding to guides page and using DropdownMenu primer component * fix linting error * remove unnecessary import * updating translation files * move data-testid * trying to fix test * fix browser tests * Update content/README.md Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com> Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { DefaultLayout } from 'components/DefaultLayout'
|
|
import { useProductGuidesContext } from 'components/context/ProductGuidesContext'
|
|
import React from 'react'
|
|
import { LandingSection } from 'components/landing/LandingSection'
|
|
import { GuidesHero } from 'components/guides/GuidesHero'
|
|
import { LearningTracks } from 'components/guides/LearningTracks'
|
|
import { ArticleCards } from 'components/guides/ArticleCards'
|
|
import { useTranslation } from 'components/hooks/useTranslation'
|
|
|
|
export const ProductGuides = () => {
|
|
const { title, learningTracks, includeGuides } = useProductGuidesContext()
|
|
const { t } = useTranslation('sub_landing')
|
|
return (
|
|
<DefaultLayout>
|
|
<LandingSection className="pt-3">
|
|
<GuidesHero />
|
|
</LandingSection>
|
|
|
|
{learningTracks && learningTracks.length > 0 && (
|
|
<LandingSection
|
|
title={`${title} learning paths`}
|
|
className="border-top py-6"
|
|
sectionLink="learning-paths"
|
|
description={t('learning_paths_desc')}
|
|
>
|
|
<LearningTracks />
|
|
</LandingSection>
|
|
)}
|
|
|
|
{includeGuides && (
|
|
<LandingSection
|
|
title={`All ${title} guides`}
|
|
className="border-top py-6 color-border-default"
|
|
sectionLink="all-guides"
|
|
>
|
|
<ArticleCards />
|
|
</LandingSection>
|
|
)}
|
|
</DefaultLayout>
|
|
)
|
|
}
|