From 90843af4a832ecd5f7b043e71e05ab53d50c0a9a Mon Sep 17 00:00:00 2001 From: "marthajerushamarumudi7@gmail.com" <144675544+Jerusha547@users.noreply.github.com> Date: Thu, 21 May 2026 10:12:10 +0530 Subject: [PATCH 1/2] Added [search-bar]: search bar added to contributions page --- src/pages/Contributors/Contributors.tsx | 182 ++++++++++++++++-------- 1 file changed, 125 insertions(+), 57 deletions(-) diff --git a/src/pages/Contributors/Contributors.tsx b/src/pages/Contributors/Contributors.tsx index d4fee52c..697b43e4 100644 --- a/src/pages/Contributors/Contributors.tsx +++ b/src/pages/Contributors/Contributors.tsx @@ -1,4 +1,6 @@ import { useEffect, useState } from "react"; +import { TextField, InputAdornment } from "@mui/material"; +import { FaSearch } from "react-icons/fa"; import { Container, Grid, @@ -28,6 +30,7 @@ const ContributorsPage = () => { const [contributors, setContributors] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); + const [searchTerm, setSearchTerm] = useState(""); // Fetch contributors from GitHub API useEffect(() => { @@ -47,6 +50,10 @@ const ContributorsPage = () => { fetchContributors(); }, []); + const filteredContributors = contributors.filter((contributor) => + contributor.login.toLowerCase().includes(searchTerm.toLowerCase()), + ); + if (loading) { return ( @@ -65,74 +72,135 @@ const ContributorsPage = () => { return (
- + 🤝 Contributors + + setSearchTerm(e.target.value)} + sx={{ + width: { + xs: "100%", + sm: "400px", + }, + maxWidth: "100%", + backgroundColor: "white", + borderRadius: "10px", + }} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + - - {contributors.map((contributor) => ( - - + {filteredContributors.length === 0 && ( + + No contributors found. + + )} + {filteredContributors.map((contributor) => ( + + + - - - - - {contributor.login} - + + + + {contributor.login} + - - {contributor.contributions} Contributions - - {/* + + {contributor.contributions} Contributions + + {/* Thank you for your valuable contributions to our community! */} - - + + - - - - + + + + ))} From c172e5dcb1b74b9553ffa8c1642a647c8d748d38 Mon Sep 17 00:00:00 2001 From: "marthajerushamarumudi7@gmail.com" <144675544+Jerusha547@users.noreply.github.com> Date: Thu, 21 May 2026 10:24:49 +0530 Subject: [PATCH 2/2] Added [fix]: add rel noopener noreferrer to external contributor links --- src/pages/Contributors/Contributors.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Contributors/Contributors.tsx b/src/pages/Contributors/Contributors.tsx index 697b43e4..56816ad1 100644 --- a/src/pages/Contributors/Contributors.tsx +++ b/src/pages/Contributors/Contributors.tsx @@ -188,6 +188,7 @@ const ContributorsPage = () => { startIcon={} href={contributor.html_url} target="_blank" + rel="noopener noreferrer" sx={{ backgroundColor: "#333333", textTransform: "none",