From 086ea9fd3dcd6c021f193a5413318e378c79570b Mon Sep 17 00:00:00 2001 From: anperederi Date: Fri, 9 Feb 2024 11:48:27 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Update=20categ=20filter=20?= =?UTF-8?q?id=20to=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Categs.tsx | 2 +- src/model/Joke.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Categs.tsx b/src/components/Categs.tsx index 369e811..359a52d 100644 --- a/src/components/Categs.tsx +++ b/src/components/Categs.tsx @@ -11,7 +11,7 @@ export default function Categs(props: JokeListItemProps) { return ( item.summary().toString()} + keyExtractor={(item) => item.type.toString()} renderItem={ ({ item }: { item: CustomJoke | SampleJoke }) => ( diff --git a/src/model/Joke.ts b/src/model/Joke.ts index 0438c37..9f50b8b 100644 --- a/src/model/Joke.ts +++ b/src/model/Joke.ts @@ -107,6 +107,6 @@ export abstract class Joke { * @return {string} Une description textuelle de la blague. */ public description(): string { - return this.type + this.summary(); + return this.type + ", " + this.summary(); } } \ No newline at end of file