1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/components/sublanding/ProductSubLanding.tsx
Kevin Heis 567652b0e3 Primer 18 b (#22462)
* Create migrate-colors-primer-18.js

* Update colors round 1

* upgrade primer packages

* Update index.scss

* Replace auto colors

* remove btn-primary-matte

* Turns out the class names and variables names DONT LINE UP... ugh....

* Check for allowed var colors
2021-10-28 19:17:23 +00:00

42 lines
1.4 KiB
TypeScript

import { DefaultLayout } from 'components/DefaultLayout'
import { useProductSubLandingContext } from 'components/context/ProductSubLandingContext'
import React from 'react'
import { LandingSection } from 'components/landing/LandingSection'
import { SubLandingHero } from 'components/sublanding/SubLandingHero'
import { LearningTracks } from 'components/sublanding/LearningTracks'
import { ArticleCards } from 'components/sublanding/ArticleCards'
import { useTranslation } from 'components/hooks/useTranslation'
export const ProductSubLanding = () => {
const { title, learningTracks, includeGuides } = useProductSubLandingContext()
const { t } = useTranslation('sub_landing')
return (
<DefaultLayout>
<LandingSection className="pt-3">
<SubLandingHero />
</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>
)
}