diff --git a/src/components/Buttons.tsx b/src/components/Buttons.tsx index 69f5036e44b5a2b0f8b56a89d0ac853bb6160676..e1ac22d55dd0aadd8419d37c279d3376bd8a7b6c 100644 --- a/src/components/Buttons.tsx +++ b/src/components/Buttons.tsx @@ -114,7 +114,7 @@ return ( export function TabButtonRow({data, classy, opentype, closing}: {data: Array<TabDatensatz>, classy?: string, opentype: string, closing: string}){ - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < data.length; i++ ){ if(classy){ rows.push(<TabButton classy={classy} type={data[i].cssname} name={data[i].buttonname} opentype={opentype} closing={closing}/>) diff --git a/src/components/Headings.tsx b/src/components/Headings.tsx index 66d8cb7d2d935a4da91d5c3a25afca981db79174..dbcf1fac633fa3bbc8d1b6bce30e9b9e6f1b8990 100644 --- a/src/components/Headings.tsx +++ b/src/components/Headings.tsx @@ -1,7 +1,7 @@ import { stringToSlug } from "../utils"; export function Hhopp({text, id}:{text: string, id?: string}){ - const arr = []; + const arr: JSX.Element[] = []; var idtext: string; if (id) { idtext = id; @@ -21,7 +21,7 @@ export function Hhopp({text, id}:{text: string, id?: string}){ } export function Hsmoke({text, id}:{text: string, id?: string}){ - const arr = []; + const arr: JSX.Element[] = []; var idtext: string; if (id) { idtext = id; diff --git a/src/components/HorizontalTimeline.tsx b/src/components/HorizontalTimeline.tsx index ec334623ca67c86a9907e59056ac76ea4c0a5797..b2e264d0ac9d8af7d8d44d1e5d41053e885b77c4 100644 --- a/src/components/HorizontalTimeline.tsx +++ b/src/components/HorizontalTimeline.tsx @@ -119,7 +119,7 @@ function TimeItem({tag, title, pic, author, tabid}: ItemProps){ function AllItems(){ - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < timelinedata.length; i++ ){ if (timelinedata[i].type === "meta"){ var name: string; @@ -164,7 +164,7 @@ function TimeItem({tag, title, pic, author, tabid}: ItemProps){ export function getItemsByType(tabid: string) { - let rows = [] + let rows: JSX.Element[] = [] for (let i = 0; i < timelinedata.length; i++) { if (tabid === timelinedata[i].tag) { var name: string; diff --git a/src/components/Photo-grid.tsx b/src/components/Photo-grid.tsx index 67169c23221c6fe0b309c3b5e616a2ed910a4af0..5f2820d69cc38fc2d76e2bf98d40f2307541e366 100644 --- a/src/components/Photo-grid.tsx +++ b/src/components/Photo-grid.tsx @@ -42,7 +42,7 @@ const images = [ export default function BFHGallery(){ - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < images.length; i++ ){ rows.push(<div><img src={images[i].src}/></div>) } diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index f4aa5a5696b03a867161a58db3cacdafa8a6516e..ad3d3ada56f32d952f48dba391ec9ddb8b839748 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -63,7 +63,7 @@ function Sidebar(){ console.log(nums) - let content = []; + let content: JSX.Element[] = []; for(let idx in nums){ const item = nums[idx]; /* console.log("idx: " + idx); diff --git a/src/components/Table.tsx b/src/components/Table.tsx index ee88868bdba213cb83db7e9bc515339268c4ab23..6770df8d942407ffa9c82b8e361057ce358d5fda 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -1,7 +1,7 @@ import { Part } from "../data/parts"; export function PartTable({data, cols}: {data: Array<Part>, cols: Array<string>}){ - let list = []; + let list: JSX.Element[] = []; for (let index = 0; index < data.length; index++) { list.push( <tr> @@ -13,7 +13,7 @@ export function PartTable({data, cols}: {data: Array<Part>, cols: Array<string>} </tr> ) } - let heads = []; + let heads: JSX.Element[] = []; for (let index = 0; index < cols.length; index++) { heads.push(<td><b>{cols[index]}</b></td>) } diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 2327c157f1d6a3d3fe075708587751536c6ade8a..e0df0e51e4ef98d3c014dabca5f93f5aa698f2a8 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -1,6 +1,6 @@ // The main tab has to be given display: block; via id css or be given the id "First" export function ButtonRowTabs({data, cla}: {data: Array<TabDatensatz>, cla: string}) { - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < data.length; i++ ){ if(data[i].main == true){ rows.push(<div id={data[i].cssname} className={cla} style={{display: "block"}}> @@ -24,7 +24,7 @@ import Collapsible from "./Collapsible"; /* import { stringToSlug } from "../utils"; */ export function BFHStyleTabs({data, cla}: {data: Array<TimelineDatenpunkt>, cla: string}) { - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < data.length; i++ ){ var problem: Boolean = false; var problem_desc: Array<string> = []; @@ -250,7 +250,7 @@ import Collapsible from "./Collapsible"; /* Interview */ export function OLDBFHStyleTabs({data, cla}: {data: Array<NodeDatensatz>, cla: string}) { - let rows = [] + let rows: JSX.Element[] = [] for ( let i = 0; i < data.length; i++ ){ if (data[i].cssname == "timeline"){ rows.push( diff --git a/src/contents/Contribution/Wiki/Filterables.tsx b/src/contents/Contribution/Wiki/Filterables.tsx index 8b0d913e72bd280b6847a9cfef77a5dfa8182f03..2b41d790eca43fe786f2f4d631058288e24fe482 100644 --- a/src/contents/Contribution/Wiki/Filterables.tsx +++ b/src/contents/Contribution/Wiki/Filterables.tsx @@ -5,7 +5,7 @@ import { Troubleshoot } from "./trouble-data"; export function Filterables(data: Array<Troubleshoot>){ let count = 2; - let results = []; + let results: JSX.Element[] = []; for (let index = 0; index < data.length; index++) { let tags = "" for (let i = 0; i < data[index].tags.length; i++) { diff --git a/src/contents/methods.tsx b/src/contents/methods.tsx index 13a28bf897b4f097cab4e1486b360d513cc998be..9e3421940efc2cdc1e15465b4965e022c68b5339 100644 --- a/src/contents/methods.tsx +++ b/src/contents/methods.tsx @@ -1,7 +1,6 @@ import { Section, Subesction } from "../components/sections"; import { useTabNavigation } from "../utils/TabNavigation"; import {H5} from "../components/Headings"; -import TestSource from "../sources/test-sources"; import MethodSources from "../sources/methods-sources"; export function Methods() { diff --git a/src/contents/team.tsx b/src/contents/team.tsx index 87ed6412ea4b8cf803633a836ecb3a9d6b617459..0d0aa1c3ed811c68b8fc4a6c89f60240f3c72eef 100644 --- a/src/contents/team.tsx +++ b/src/contents/team.tsx @@ -36,7 +36,7 @@ export function Team() { function createSteckbriefe(data: Array<SteckbriefInterface>){ - let briefe = [] + let briefe: JSX.Element[] = [] for (let index = 0; index < data.length; index++) { let thename = "" + data[index].vorname + data[index].nachname; // Conditional head of @@ -62,7 +62,7 @@ function createSteckbriefe(data: Array<SteckbriefInterface>){ } } // Funfacts - var funfacts = []; + var funfacts: JSX.Element[] = []; for (let i = 0; i < data[index].funfacts.length; i++) { funfacts.push(<li key={`f${i}`}> {data[index].funfacts[i]} </li>); } @@ -83,7 +83,7 @@ function createSteckbriefe(data: Array<SteckbriefInterface>){ } } // Whyigem - var why = []; + var why: JSX.Element[] = []; for (let i = 0; i < data[index].whyigem.length; i++) { why.push(<p>{data[index].whyigem[i]}</p>); } @@ -93,12 +93,12 @@ function createSteckbriefe(data: Array<SteckbriefInterface>){ title = data[index].title!; } // challenges - let challs = []; + let challs: JSX.Element[] = []; for (let i = 0; i < data[index].biggestchallenge.length; i++) { challs.push(<li key={`d${i}`}>{data[index].biggestchallenge[i]}</li>); } // bestparts - let bests = []; + let bests: JSX.Element[] = []; for (let i = 0; i < data[index].bestpart.length; i++) { bests.push(<li key={`e${i}`}>{data[index].bestpart[i]}</li>); } @@ -140,7 +140,7 @@ function createSteckbriefe(data: Array<SteckbriefInterface>){ } function createPiSteckbriefe(data: Array<SteckbriefInterface>){ - let briefe = [] + let briefe: JSX.Element[] = [] for (let index = 0; index < data.length; index++) { let thename = "" + data[index].vorname + data[index].nachname; // Conditional head of @@ -159,7 +159,7 @@ function createPiSteckbriefe(data: Array<SteckbriefInterface>){ } } // Funfacts - var funfacts = []; + var funfacts: JSX.Element[] = []; for (let i = 0; i < data[index].funfacts.length; i++) { funfacts.push(<li key={`a${i}`}> {data[index].funfacts[i]} </li>); } @@ -178,7 +178,7 @@ function createPiSteckbriefe(data: Array<SteckbriefInterface>){ } } // Whyigem - var why = []; + var why: JSX.Element[] = []; for (let i = 0; i < data[index].whyigem.length; i++) { why.push(<p>{data[index].whyigem[i]}</p>); } @@ -188,12 +188,12 @@ function createPiSteckbriefe(data: Array<SteckbriefInterface>){ title = data[index].title!; } // challenges - let challs = []; + let challs: JSX.Element[] = []; for (let i = 0; i < data[index].biggestchallenge.length; i++) { challs.push(<li key={`b${i}`}>{data[index].biggestchallenge[i]}</li>); } // bestparts - let bests = []; + let bests: JSX.Element[] = []; for (let i = 0; i < data[index].bestpart.length; i++) { bests.push(<li key={`c${i}`}>{data[index].bestpart[i]}</li>); }