fix lint errors
This commit is contained in:
@@ -27,7 +27,7 @@ export const Breadcrumbs = () => {
|
|||||||
{breadcrumb.title}
|
{breadcrumb.title}
|
||||||
</span>
|
</span>
|
||||||
) : pathWithLocale.includes('/guides') ? (
|
) : pathWithLocale.includes('/guides') ? (
|
||||||
<span className='text-mono color-text-secondary text-uppercase'>
|
<span className="text-mono color-text-secondary text-uppercase">
|
||||||
<Link
|
<Link
|
||||||
key={title}
|
key={title}
|
||||||
href={breadcrumb.href}
|
href={breadcrumb.href}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { createContext, useContext } from 'react'
|
import { createContext, useContext } from 'react'
|
||||||
import pick from 'lodash/pick'
|
import pick from 'lodash/pick'
|
||||||
import _ from 'lodash'
|
|
||||||
|
|
||||||
export type FeaturedTrack = {
|
export type FeaturedTrack = {
|
||||||
trackName: string
|
trackName: string
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ export const CodeExampleCard = ({ example }: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
<footer className="border-top p-4 color-text-secondary d-flex flex-items-center">
|
<footer className="border-top p-4 color-text-secondary d-flex flex-items-center">
|
||||||
<RepoIcon className="flex-shrink-0" />
|
<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}
|
{example.href}
|
||||||
</TruncateLines>
|
</TruncateLines>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export const LandingSection = ({ title, children, className, sectionLink, descri
|
|||||||
return (
|
return (
|
||||||
<div className={cx('container-xl px-3 px-md-6', className)} id={sectionLink}>
|
<div className={cx('container-xl px-3 px-md-6', className)} id={sectionLink}>
|
||||||
{title && (
|
{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}
|
{sectionLink ? <a href={`#${sectionLink}`}>{title}</a> : title}
|
||||||
</h2>
|
</h2>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ type Props = {
|
|||||||
|
|
||||||
const MAX_VISIBLE_GUIDES = 4
|
const MAX_VISIBLE_GUIDES = 4
|
||||||
export const LearningTrack = ({ track }: Props) => {
|
export const LearningTrack = ({ track }: Props) => {
|
||||||
// const guides = track?.guides
|
|
||||||
const [visibleGuides, setVisibleGuides] = useState(track.guides?.slice(0, 4))
|
const [visibleGuides, setVisibleGuides] = useState(track.guides?.slice(0, 4))
|
||||||
const showAll = () => {
|
const showAll = () => {
|
||||||
setVisibleGuides(track.guides)
|
setVisibleGuides(track.guides)
|
||||||
@@ -57,8 +56,8 @@ export const LearningTrack = ({ track }: Props) => {
|
|||||||
{t('guide_types')[guide.page.type]}
|
{t('guide_types')[guide.page.type]}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{track.guides && track.guides?.indexOf(guide) + 1 == MAX_VISIBLE_GUIDES ? (
|
{track.guides && track.guides?.indexOf(guide) + 1 === MAX_VISIBLE_GUIDES ? (
|
||||||
<a
|
<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"
|
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}
|
onClick={showAll}
|
||||||
>
|
>
|
||||||
@@ -69,7 +68,7 @@ export const LearningTrack = ({ track }: Props) => {
|
|||||||
<span>
|
<span>
|
||||||
Show {track.guides?.length - MAX_VISIBLE_GUIDES} {t(`more_guides`)}
|
Show {track.guides?.length - MAX_VISIBLE_GUIDES} {t(`more_guides`)}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div />
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user