diff --git a/frontend/src/i18n/fr.ts b/frontend/src/i18n/fr.ts index 209d20f..a2b80ef 100644 --- a/frontend/src/i18n/fr.ts +++ b/frontend/src/i18n/fr.ts @@ -58,6 +58,7 @@ const fr = { 'home.deleteTooltip': 'Supprimer', 'home.deleteConfirmTooltip': 'Cliquer a nouveau pour confirmer', 'home.noPreview': 'Aucune annonce majeure cette semaine.', + 'home.previewCount': '{count} articles', 'home.loadError': 'Erreur lors du chargement des syntheses.', 'home.deleteError': 'Erreur lors de la suppression de la synthese.', 'home.generationInProgress': 'Une generation est en cours...', diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 3b65da6..2d8cb99 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -178,16 +178,13 @@ const Home: Component = () => {
0} - fallback={ -

{t('home.noPreview')}

- } + when={synth.first_section_title} + fallback={

{t('home.noPreview')}

} > - - {(item) => ( -

• {item.title}

- )} -
+

{synth.first_section_title}

+

+ {t('home.previewCount', { count: String(synth.first_section_item_count) })} +

diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 15db2c1..36e40e6 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -122,9 +122,10 @@ export interface Synthesis { export interface SynthesisListItem { id: string; week: string; - sections: NewsSection[]; status: string; created_at: string; + first_section_title: string | null; + first_section_item_count: number; } export interface GenerateResponse {