diff --git a/src/client/Banner.tsx b/src/client/Banner.tsx index 4460d0f..46a0aff 100644 --- a/src/client/Banner.tsx +++ b/src/client/Banner.tsx @@ -2,7 +2,7 @@ import React from 'react'; import Link from './Link'; interface Link { - to: string; + status: string; text: string; } @@ -10,14 +10,15 @@ interface BannerProps { title: string; description: string; links: Array; - image: string; + image: string; + setStatus: any; } /** * @return {jsx} The root component */ export default function Banner( - {title, description, links, image}: BannerProps) { + {setStatus, title, description, links, image}: BannerProps) { let imgUrl; if (image.startsWith('/static/images/')) { imgUrl = image; @@ -61,11 +62,11 @@ export default function Banner(
{links.map((elem, index) =>

- + onClick={() => setStatus(elem.status)}> + {elem.text}

)} diff --git a/src/client/Blog.tsx b/src/client/Blog.tsx index a53211c..ea04313 100644 --- a/src/client/Blog.tsx +++ b/src/client/Blog.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Banner from './Banner'; +import Footer from './Footer'; /** * @return {jsx} The homepage component @@ -7,20 +7,48 @@ import Banner from './Banner'; export default function Blog() { return ( - +
  • curious.roamers@gmail.com
  • +
  • 06 37 11 28 22
  • + , + links: [ + { + to: '/contact', + text: `Autres façons de nous contacter`, + }, + ], + }, { + title: 'Donation', + description: `Si vous voulez contribuer à financer nos + futurs voyages ou simplement nous aider financièrement + :)`, + links: [ + { + to: 'https://paypal.me/ygarrot', + text: 'Paypal', + }, { + to: 'https://tipeee.com/curious-roamers', + text: 'Tipeee', + }, + ], }, - ]} - image={'map.jpeg'} - /> + ]}/>
    ); } diff --git a/src/client/Home.tsx b/src/client/Home.tsx index 57fd633..0e3152d 100644 --- a/src/client/Home.tsx +++ b/src/client/Home.tsx @@ -4,13 +4,18 @@ import Quote from './Quote'; import Footer from './Footer'; import ImagesWithDescription from './ImagesWithDescription'; +interface HomeProps { + setStatus: any; +} + /** * @return {jsx} The homepage component */ -export default function Home() { +export default function Home({setStatus}: HomeProps) { return ( ); const [navbarStatus, setNavbarStatus] = useState('Home'); + const [page, setPage] = useState(); useEffect(() => { if (navbarStatus == 'Home') { - setPage(); + setPage(); } else if (navbarStatus == 'Blog') { setPage(); } else if (navbarStatus == 'About') {