Skip to content

Commit

Permalink
Merge pull request #69 from Computer-Society-ITBA/develop
Browse files Browse the repository at this point in the history
Merge Develop branch
  • Loading branch information
FSendot authored Sep 20, 2024
2 parents 89dc2cc + d6e94e7 commit eec7c99
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 85 deletions.
61 changes: 38 additions & 23 deletions src/components/sections/sponsors.jsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
// Translations
import i18n from '../../i18n/index.js';

// Data
import sponsors from '../../data/sponsors';
//Imports from firebase
import { db } from "../../firebase";
import { collection, getDocs } from "firebase/firestore";

// Images
const sponsorImages = import.meta.glob("../../images/sponsors/*", { eager: true, as: "url" });

// Components
const Section = React.lazy(() => import('../section'));
import Marquee from "react-fast-marquee";

function Sponsors() {
const settings = {
gradient: "true",
direction: "left",
speed: 70,
const settings = {
gradient: "true",
direction: "left",
speed: 70,
}



const [sponsors, setSponsors] = useState([]);


useEffect(() => {
async function fetchSponsors() {;
const query = await getDocs(collection(db, "sponsors"));
const data = query.docs.map((doc) => doc.data());
setSponsors(data);
}
fetchSponsors();
}, []);



return (
<Section id="our-sponsors" bgColor='bg-white' textAlignment='center'>
<h2>{i18n.t('sponsors.title')}</h2>
<Marquee {...settings}>
{sponsors.map((sponsor, index) => (
<div key={index} className="py-10 px-5 mx-10" >
<a href={sponsor.link} rel='noreferrer' target='_blank'>
<img src={sponsorImages[`../../images/sponsors/${sponsor.src}`]} alt={i18n.t(sponsor.alt)} className=" h-16 my-0 mx-auto" />
</a>
</div>
))}
</Marquee>
</Section>
)
return (
<Section id="our-sponsors" bgColor='bg-white' textAlignment='center'>
<h2>{i18n.t('sponsors.title')}</h2>
<Marquee {...settings}>
{sponsors.map((sponsor, index) => (
<div key={index} className="py-10 px-5 mx-10" >
<a href={sponsor.link} rel='noreferrer' target='_blank'>
<img src={sponsor.src} alt={i18n.t(sponsor.alt)} className=" h-16 my-0 mx-auto" />
</a>
</div>
))}
</Marquee>
</Section>
)
}


Expand Down
62 changes: 0 additions & 62 deletions src/data/sponsors.json

This file was deleted.

Binary file removed src/images/sponsors/BBVA.png
Binary file not shown.
Binary file removed src/images/sponsors/Emi.png
Binary file not shown.
Binary file removed src/images/sponsors/baciudad.png
Binary file not shown.
Binary file removed src/images/sponsors/chevron.png
Binary file not shown.
Binary file removed src/images/sponsors/emprelatam.png
Binary file not shown.
Binary file removed src/images/sponsors/extrimian.png
Binary file not shown.
Binary file removed src/images/sponsors/iadt.png
Binary file not shown.
Binary file removed src/images/sponsors/lewagon.png
Binary file not shown.
Binary file removed src/images/sponsors/logos.psd
Binary file not shown.
Binary file removed src/images/sponsors/proios.png
Binary file not shown.
Binary file removed src/images/sponsors/tangoid.png
Binary file not shown.
Binary file removed src/images/sponsors/wuru.png
Binary file not shown.
Binary file removed src/images/sponsors/zennon.png
Binary file not shown.

0 comments on commit eec7c99

Please sign in to comment.