import { useRouter } from 'next/router' import { Link } from '@/frame/components/Link' import type { LearningTrack } from '@/frame/components/context/ArticleContext' import { useTranslation } from '@/languages/components/useTranslation' type Props = { track: LearningTrack } export function LearningTrackCard({ track }: Props) { const { locale } = useRouter() const { t } = useTranslation('learning_track_nav') const { trackTitle, trackName, nextGuide, trackProduct, numberOfGuides, currentGuideIndex } = track return (

{trackTitle}

{t('current_progress') .replace('{n}', `${numberOfGuides}`) .replace('{i}', `${currentGuideIndex + 1}`)}
{nextGuide ? ( <> {t('next_guide')}: {nextGuide.title} ) : ( {t('more_guides')} )}
) }