'use client' import type { AttemptResult, Translate } from './types' type SessionSummaryCardProps = { t: Translate attemptsTotal: number successCount: number failureCount: number mostRecentAttempt?: AttemptResult } export default function SessionSummaryCard({ t, attemptsTotal, successCount, failureCount, mostRecentAttempt }: SessionSummaryCardProps) { return (
{t('challenges.player.sessionSummary', 'Session Summary')}
{t('challenges.player.totalAttempts', 'Total attempts')} {attemptsTotal}
{t('challenges.player.successfulAttempts', 'Successful')} {successCount}
{t('challenges.player.failedAttempts', 'Failed')} {failureCount}
{mostRecentAttempt && (
{t('challenges.player.lastAttempt', 'Last attempt')}
{new Date(mostRecentAttempt.timestamp).toLocaleTimeString()} ยท {mostRecentAttempt.success ? t('challenges.player.status.success') : t('challenges.player.status.failed')}
)}
) }