Skip to content

Commit

Permalink
Merge pull request #233 from LleidaHack/integration
Browse files Browse the repository at this point in the history
Integration
  • Loading branch information
elver5041 authored Sep 25, 2024
2 parents a1d4140 + 64b53d5 commit 4342d72
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export default function App() {
<Route path="*" element={<Error404 />} />
</Routes>
</Router>
{/*
<Router basename="/lleidahack">
<Routes>
<Route path="/" element={<HomeLanding />} />
Expand All @@ -105,7 +106,7 @@ export default function App() {
<Route path="/events" element={<EventsLanding />} />
<Route path="/legalinfo" element={<LegalInfoLanding />} />
</Routes>
</Router>
</Router>*/}
</div>
);
}
10 changes: 5 additions & 5 deletions src/components/hackeps/Home/Sponsors.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ img {
}

.sponsor-group-group-1 {
margin-top: 2rem;
display: flex;
width: 100%;
scale: 1.5;
justify-content: center;
scale: 1.2;
}

.sponsor-group-group-2 {
display: flex;
width: 90%;
scale: 0.9;
width: 100%;
justify-content: center;
scale: 1;
}

.sponsor-group-group-3 {
display: flex;
width: 18%;
scale: 0.5;
scale: 0.81;
justify-content: center;
}

Expand Down
21 changes: 16 additions & 5 deletions src/components/hackeps/Home/Sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ const Sponsors = () => {
useEffect(() => {
const fetchData = async () => {
try {
const companyData = await getCompanyByTier(1);
const companyDataTier1 = await getCompanyByTier(1);
const companyDataTier2 = await getCompanyByTier(2);
getInfoAll(companyData);
companyData.map((pos, index) => {
const companyDataTier3 = await getCompanyByTier(3);
getInfoAll(companyDataTier1);
companyDataTier1.map((pos, index) => {
imgs2[index] = {
image: pos.image,
importance: 1,
Expand All @@ -57,6 +58,14 @@ const Sponsors = () => {
id: pos.id,
});
});
companyDataTier3.map((pos, index) => {
imgs2.push({
image: pos.image,
importance: 3,
url: pos.website,
id: pos.id,
});
});
} catch (error) {
console.log("El error obtenido es:", error);
}
Expand All @@ -68,14 +77,15 @@ const Sponsors = () => {
const groups = {
1: [],
2: [],
3: [],
};

imgs2.forEach((img) => {
groups[img.importance].push(
<img
key={img.image}
src={img.image}
alt={`Logo ${img.importance}`}
alt={`Logo empresa`}
className="bg-white pepers"
onClick={() => redirectToURL(img.id)}
/>,
Expand All @@ -97,9 +107,10 @@ const Sponsors = () => {
</Button>
</Link>
<section className="spnsection">
<div className="sponsors-container">
<div className="sponsors-container text-xs">
<div className="sponsor-group-group-1">{groups[1]}</div>
<div className="sponsor-group-group-2">{groups[2]}</div>
<div className="sponsor-group-group-3">{groups[3]}</div>
</div>
</section>
<br />
Expand Down
8 changes: 5 additions & 3 deletions src/pages/hackeps/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from "react";
import {
acceptHackerToEvent,
getHackeps,
getPendingHackersGruped,
rejectHackerToEvent,
} from "src/services/EventService";
Expand Down Expand Up @@ -38,7 +39,8 @@ function TableRow({ user: userParam, isGroup }) {
}, [userParam]);

async function handleAcceptar() {
if (await acceptHackerToEvent(user.id, "1")) {
let hack = await getHackeps();
if (await acceptHackerToEvent(user.id, hack.id)) {
setIsApproved(true);
}
}
Expand All @@ -55,8 +57,8 @@ function TableRow({ user: userParam, isGroup }) {
]);

if (res !== user.name) return;

await rejectHackerToEvent(user.id, "1");
let hack = await getHackeps();
await rejectHackerToEvent(user.id, hack.id);
window.location.reload();
return;
}
Expand Down

0 comments on commit 4342d72

Please sign in to comment.