1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/components/guides/ProductGuides.tsx
Grace Park 4ff5167e51 Updating name: sublanding to guides and using DropdownMenu for type/topics filter (#23290)
* 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>
2021-12-02 18:43:33 +00:00

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>
)
}