fix lint errors
This commit is contained in:
@@ -26,21 +26,8 @@ export const Breadcrumbs = () => {
|
||||
<span key={title} title={title}>
|
||||
{breadcrumb.title}
|
||||
</span>
|
||||
) : pathWithLocale.includes('/guides') ? (
|
||||
<span className='text-mono color-text-secondary text-uppercase'>
|
||||
<Link
|
||||
key={title}
|
||||
href={breadcrumb.href}
|
||||
title={title}
|
||||
className={cx(
|
||||
'd-inline-block',
|
||||
pathWithLocale === breadcrumb.href && 'color-text-tertiary'
|
||||
)}
|
||||
>
|
||||
{breadcrumb.title}
|
||||
</Link>
|
||||
</span>
|
||||
) : (
|
||||
) : pathWithLocale.includes('/guides') ? (
|
||||
<span className="text-mono color-text-secondary text-uppercase">
|
||||
<Link
|
||||
key={title}
|
||||
href={breadcrumb.href}
|
||||
@@ -52,7 +39,20 @@ export const Breadcrumbs = () => {
|
||||
>
|
||||
{breadcrumb.title}
|
||||
</Link>
|
||||
)
|
||||
</span>
|
||||
) : (
|
||||
<Link
|
||||
key={title}
|
||||
href={breadcrumb.href}
|
||||
title={title}
|
||||
className={cx(
|
||||
'd-inline-block',
|
||||
pathWithLocale === breadcrumb.href && 'color-text-tertiary'
|
||||
)}
|
||||
>
|
||||
{breadcrumb.title}
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { createContext, useContext } from 'react'
|
||||
import pick from 'lodash/pick'
|
||||
import _ from 'lodash'
|
||||
|
||||
export type FeaturedTrack = {
|
||||
trackName: string
|
||||
|
||||
@@ -29,7 +29,11 @@ export const CodeExampleCard = ({ example }: Props) => {
|
||||
</div>
|
||||
<footer className="border-top p-4 color-text-secondary d-flex flex-items-center">
|
||||
<RepoIcon className="flex-shrink-0" />
|
||||
<TruncateLines as="span" maxLines={1} className="ml-2 text-mono text-small color-text-link line-break-anywhere">
|
||||
<TruncateLines
|
||||
as="span"
|
||||
maxLines={1}
|
||||
className="ml-2 text-mono text-small color-text-link line-break-anywhere"
|
||||
>
|
||||
{example.href}
|
||||
</TruncateLines>
|
||||
</footer>
|
||||
|
||||
@@ -14,7 +14,7 @@ export const LandingSection = ({ title, children, className, sectionLink, descri
|
||||
return (
|
||||
<div className={cx('container-xl px-3 px-md-6', className)} id={sectionLink}>
|
||||
{title && (
|
||||
<h2 className={cx('font-mktg', !!description ? 'mb-3' : 'mb-4')}>
|
||||
<h2 className={cx('font-mktg', !description ? 'mb-3' : 'mb-4')}>
|
||||
{sectionLink ? <a href={`#${sectionLink}`}>{title}</a> : title}
|
||||
</h2>
|
||||
)}
|
||||
|
||||
@@ -9,7 +9,6 @@ type Props = {
|
||||
|
||||
const MAX_VISIBLE_GUIDES = 4
|
||||
export const LearningTrack = ({ track }: Props) => {
|
||||
// const guides = track?.guides
|
||||
const [visibleGuides, setVisibleGuides] = useState(track.guides?.slice(0, 4))
|
||||
const showAll = () => {
|
||||
setVisibleGuides(track.guides)
|
||||
@@ -57,8 +56,8 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
{t('guide_types')[guide.page.type]}
|
||||
</div>
|
||||
</a>
|
||||
{track.guides && track.guides?.indexOf(guide) + 1 == MAX_VISIBLE_GUIDES ? (
|
||||
<a
|
||||
{track.guides && track.guides?.indexOf(guide) + 1 === MAX_VISIBLE_GUIDES ? (
|
||||
<button
|
||||
className="Box-footer btn-link border-top-0 position-relative text-center text-bold color-text-link pt-1 pb-3 col-12 js-show-more-button"
|
||||
onClick={showAll}
|
||||
>
|
||||
@@ -69,7 +68,7 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
<span>
|
||||
Show {track.guides?.length - MAX_VISIBLE_GUIDES} {t(`more_guides`)}
|
||||
</span>
|
||||
</a>
|
||||
</button>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user