diff --git a/src/components/HorizontalTimeline.tsx b/src/components/HorizontalTimeline.tsx index ff12beb6508b490e1deaff89af30a2b9e13436bb..1ef01c53ce7150ba8ac118262e93e6b96a6c8880 100644 --- a/src/components/HorizontalTimeline.tsx +++ b/src/components/HorizontalTimeline.tsx @@ -41,13 +41,19 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){ return rows; } - export function TimeHori(){ - + export function TimeHori({tab}: {tab: string}){ + let nod = undefined; + if (tab = ""){ + nod = <AllItems></AllItems> + } + else{ + nod = <getTypeItems ta={tab}></getTypeItems> + } return( <div> <section className="timeline row align-items-center"> <ol className="timelineol"> - <AllItems></AllItems> + {nod} <li className="timelineolli"></li> </ol> @@ -132,9 +138,9 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){ return rows; } - export function getTypeItems(ta: string){ + export function getTypeItems({ta}: {ta: string}){ let rows = [] - for ( let i = 0; i < data.length; i++ ){ + for ( let i = 0; i < data.length; i++){ if (ta = data[i].tag) rows.push(<TimeItem title={data[i].title}