From 60a49484d11de3eb870d2d659562499899c5a829 Mon Sep 17 00:00:00 2001 From: liliana <liliana.sanfilippo@uni-bielefeld.de> Date: Thu, 18 Jul 2024 16:35:02 +0200 Subject: [PATCH] data imports from file now --- src/components/HorizontalTimeline.tsx | 42 +------------------ .../{humanpractice.js => humanpractice.ts} | 0 src/components/seclarations.ts | 1 + 3 files changed, 2 insertions(+), 41 deletions(-) rename src/components/data/{humanpractice.js => humanpractice.ts} (100%) diff --git a/src/components/HorizontalTimeline.tsx b/src/components/HorizontalTimeline.tsx index f32d898b..dcc4b8fd 100644 --- a/src/components/HorizontalTimeline.tsx +++ b/src/components/HorizontalTimeline.tsx @@ -1,9 +1,4 @@ - - - - - - +import { HPdata as data} from "./seclarations"; function TimeItem({color, tag, title, children, pic, author, tabid}: ItemProps){ return( @@ -140,38 +135,3 @@ function TimeItem({color, tag, title, children, pic, author, tabid}: ItemProps){ } -let data = [ - { - title: "Deutlich längerer Titel zum Test", - pic: "https://static.igem.wiki/teams/5247/placeholders/placehilderperson.jpeg", - tag: "Langer langer TAgs", - color: "blue", - author: "author", - tabid: "Eins", - text: "Text", - }, - { - title: "Deutlich längerer Titel zum Test", - pic: "https://static.igem.wiki/teams/5247/placeholders/placehilderperson.jpeg", - tag: "Langer langer TAgs", - color: "blue", - author: "author", - tabid: "Eins", - text: "Text", - }, - { - title: "Deutlich längerer Titel zum Test" , - pic: "https://static.igem.wiki/teams/5247/placeholders/placehilderperson.jpeg", - tag: "Tag", - color: "blue", - author: "a", - tabid: "Paris", - text: "Text", - } - ] - - - - - - diff --git a/src/components/data/humanpractice.js b/src/components/data/humanpractice.ts similarity index 100% rename from src/components/data/humanpractice.js rename to src/components/data/humanpractice.ts diff --git a/src/components/seclarations.ts b/src/components/seclarations.ts index 968eecec..64a3d453 100644 --- a/src/components/seclarations.ts +++ b/src/components/seclarations.ts @@ -7,6 +7,7 @@ export * from './AOSs.tsx' export * from './My-Timeline.tsx' export * from './data/mapscr.ts' +export * from './data/humanpractice.ts' declare global{ interface Window { datawrapper: Datawrapper; -- GitLab