Release Notes
{data?.version ? `Current version v${data.version}` : 'Full project changelog'} {data?.updated_at ? ` ยท Updated ${formatDateTime(data.updated_at)}` : ''}
Unable to load release notes.
{error}
No release notes are available.
import { useCallback, useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { ArrowLeft, RefreshCw } from 'lucide-react'; import { toast } from 'sonner'; import { api } from '@/api'; import { cn, errMessage } from '@/lib/utils'; import { Button } from '@/components/ui/button'; import { MarkdownText } from '@/components/MarkdownText'; interface ReleaseHistoryData { history?: string; version?: string; updated_at?: string; } function formatDateTime(value: string | null | undefined): string | null { if (!value) return null; const date = new Date(value); if (Number.isNaN(date.getTime())) return value; return date.toLocaleString(); } function parseImageLine(line: string): { alt: string; src: string } | null { const match = line.match(/^!\[([^\]\n]*)\]\(([^)\s]+)\)$/); if (!match) return null; return { alt: match[1] ?? '', src: match[2] ?? '' }; } function HistoryLine({ line, index }: { line: string; index: number }) { const trimmed = line.trim(); const image = parseImageLine(trimmed); if (!trimmed) return
; if (trimmed === '---') return ; if (image) { return (
{data?.version ? `Current version v${data.version}` : 'Full project changelog'} {data?.updated_at ? ` ยท Updated ${formatDateTime(data.updated_at)}` : ''}
Unable to load release notes.
{error}
No release notes are available.