import { type Component, createSignal, onMount, Show, For, } from 'solid-js'; import { useParams, useNavigate, A } from '@solidjs/router'; import { ArrowLeft, ExternalLink, Trash2, AlertTriangle, Mail, Send, FileDown } from 'lucide-solid'; import { useI18n } from '~/i18n'; import { useAuth } from '~/contexts/AuthContext'; import { synthesesApi } from '~/api/syntheses'; import { articleHistoryApi } from '~/api/articleHistory'; import { isApiError } from '~/types'; import type { Synthesis, NewsItem as NewsItemType, ArticleHistoryEntry } from '~/types'; import { extractWeekNumber, formatDateLong } from '~/utils/dates'; import LoadingSpinner from '~/components/ui/LoadingSpinner'; /** Renders a single news article with its title (linked) and summary. */ const NewsItemCard: Component<{ item: NewsItemType }> = (props) => { return (
{props.item.summary}
{error()}
← {t('synthesis.backToHome')} } > {(synth) => ({t('synthesis.deleteConfirmMessage')}
{t('synthesis.noSections')}
} >{t('articleHistory.provenanceEmpty')}
| {t('articleHistory.status')} | {t('articleHistory.articleTitle')} | {t('articleHistory.url')} | {t('articleHistory.sourceType')} | {t('articleHistory.category')} |
|---|---|---|---|---|
| {entry.status} | {entry.title || '—'} | {entry.url.length > 50 ? entry.url.slice(0, 50) + '...' : entry.url} | {entry.source_type} | {entry.category || '—'} |