From 0a1617c4989ceb8e233568bb5eded9f091228f3c Mon Sep 17 00:00:00 2001 From: Liliana Sanfilippo <liliana.sanfilippo@uni-bielefeld.de> Date: Sun, 29 Sep 2024 14:21:08 +0200 Subject: [PATCH] : JSX.Element[] --- src/contents/description.tsx | 13 ++++++------- src/data/symptom-data.tsx | 15 --------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/contents/description.tsx b/src/contents/description.tsx index ce7d4a7b..bf733d5a 100644 --- a/src/contents/description.tsx +++ b/src/contents/description.tsx @@ -613,12 +613,11 @@ let symptombuttonrowdata = [ function createSymptomSteckbrief(data: SymptomDatensatz){ - let examplelist = []; + let examplelist: JSX.Element[] = []; for (let index = 0; index < data.introduction.length; index++) { examplelist.push( - <li>{data.introduction[index]}</li> + <li key={index}>{data.introduction[index]}</li> ) - } return( <div> @@ -641,19 +640,19 @@ function createSymptomSteckbrief(data: SymptomDatensatz){ function createDrugSteckbrief(data: DrugDatensatz){ - let examplelist = []; + let examplelist: JSX.Element[] = []; for (let index = 0; index < data.examples.length; index++) { - let absaetze = [] + let absaetze: JSX.Element[] = [] for (let i = 0; i < data.examples[index].text.length; i++) { absaetze.push( - <li>{data.examples[index].text[i]}</li> + <li key={i}>{data.examples[index].text[i]}</li> ) } examplelist.push( <div className="drug"> <H4 text={data.examples[index].title}/> - <ul>{absaetze}</ul> + <ul key={index}>{absaetze}</ul> </div> ) diff --git a/src/data/symptom-data.tsx b/src/data/symptom-data.tsx index 5624a06c..9a4014c3 100644 --- a/src/data/symptom-data.tsx +++ b/src/data/symptom-data.tsx @@ -53,19 +53,4 @@ export const symptomdata: (Array<SymptomDatensatz>) = [ picture: "https://static.igem.wiki/teams/5247/scientific-figures/brain.svg", introduction: [<>Located inside the skull</>,<>Responsible for cognitive functions, movement coordination, and control of vital functions [29]</>,<>CF affects mental health due to psychological stress and social isolation [30]</>,<>This can lead in context of CF to physical illnesses like depression and anxiety disorders [30]</>,<>Treatment options include psychotherapy, antidepressants, support groups and sports [31]</>] } -// -// name: "guts", -// picture: "https://static.igem.wiki/teams/5247/scientific-figures/pregnancy.svg", -// introduction: "", -// subsections: [ -// { -// title: "", -// text: ["string"] -// }, -// { -// title: "", -// text: ["string"] -// }, -// ] -// } ] \ No newline at end of file -- GitLab