diff --git a/frontend/src/components/landing/TeamSection.tsx b/frontend/src/components/landing/TeamSection.tsx index 8ee366e2..25727a39 100644 --- a/frontend/src/components/landing/TeamSection.tsx +++ b/frontend/src/components/landing/TeamSection.tsx @@ -39,6 +39,14 @@ const INITIAL_TEAM: Contributor[] = [ html_url: "https://github.com/thalitat", contributions: 0, type: "User" + }, + { + id: 999999998, + login: "jeremiassnts", + avatar_url: "https://github.com/jeremiassnts.png", + html_url: "https://github.com/jeremiassnts", + contributions: 0, + type: "User" } ]; @@ -51,7 +59,7 @@ export default function TeamSection() { useEffect(() => { fetch(`https://api.github.com/repos/${OWNER}/${REPO}/contributors`, { headers: { - 'Accept': 'application/vnd.github.v3+json', + Accept: 'application/vnd.github.v3+json', } }) .then((res) => { @@ -64,20 +72,29 @@ export default function TeamSection() { const realUsers = (data as Contributor[]) .filter(user => user.type === 'User') .map(user => { - if (user.login.toLowerCase() === "pedrolucas1337") { + const login = user.login.toLowerCase(); + + if (login === "pedrolucas1337") { return { ...user, avatar_url: "https://github.com/PedroLucas1337.png" }; } - if (user.login.toLowerCase() === "thalitat") { + if (login === "thalitat") { return { ...user, avatar_url: "https://avatars.githubusercontent.com/u/110640572?v=4" }; } + if (login === "jeremiassnts") { + return { + ...user, + avatar_url: "https://github.com/jeremiassnts.png" + }; + } + return user; }); @@ -97,6 +114,14 @@ export default function TeamSection() { html_url: "https://github.com/thalitat", contributions: 0, type: "User" + }, + { + id: 999999998, + login: "jeremiassnts", + avatar_url: "https://github.com/jeremiassnts.png", + html_url: "https://github.com/jeremiassnts", + contributions: 0, + type: "User" } ]; @@ -110,27 +135,45 @@ export default function TeamSection() { } }); - if (realUsers.length > 0) { - setContributors(realUsers); - } + const merged = [...INITIAL_TEAM, ...realUsers]; + + const unique = merged.filter( + (user, index, self) => + index === self.findIndex( + u => u.login.toLowerCase() === user.login.toLowerCase() + ) + ); + + setContributors(unique); }) .catch((err) => { - console.warn("GitHub API offline ou limitada. Mantendo lista local:", err.message); + console.warn( + "GitHub API offline ou limitada. Mantendo lista local:", + err.message + ); }); }, []); return ( -
+

- Nosso Time de Contribuidores + Nosso{" "} + + Time + {" "} + de Contribuidores

Conheça as mentes brilhantes por trás do{" "} - + < - Cand!Date! + Cand!Date + ! >
@@ -177,6 +220,8 @@ export default function TeamSection() { ? "QA" : user.login.toLowerCase() === "thalitat" ? "UX/UI Designer" + : user.login.toLowerCase() === "jeremiassnts" + ? "Engenheiro de Software Senior" : `${user.contributions} ${user.contributions === 1 ? 'commit' : 'commits'}`}

@@ -188,7 +233,7 @@ export default function TeamSection() { className="w-full py-2 px-4 bg-gradient-to-r from-blue-600 via-indigo-600 to-violet-600 hover:opacity-90 text-white flex items-center justify-center text-sm font-medium rounded-lg transition-all duration-200 gap-2 shadow-sm" > Ver Perfil - +