diff --git a/client/src/App.jsx b/client/src/App.jsx index a87b7e6..67e6e81 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -25,7 +25,7 @@ import Community from "./component/Community"; import MyProfile from "./component/MyProfile"; import ScrollTop from "./component/ScrollTop"; import EditProfile from "./component/EditProfile"; -import Contributors from "./component/Contributor"; +import Contributors from "./component/Contributors"; import Discussion from "./component/Discussion"; import ForgotPassword from "./component/ForgotPassword"; import ResetPassword from "./component/ResetPassword"; @@ -34,9 +34,9 @@ import ResetPassword from "./component/ResetPassword"; import NotFound from "./component/NotFound"; import Faq from "./component/Faq"; import ProgressBar from "./component/ProgressBar/ProgressBar"; - import Cursor from './component/Cursor'; +import Cursor from './component/Cursor'; import ReadMoreBlog from './component/ReadMoreBlog'; - + import AOS from "aos"; import "aos/dist/aos.css"; @@ -245,7 +245,7 @@ function App() { } /> {/* } /> */} - } /> + } /> } /> } /> } /> @@ -261,7 +261,7 @@ function App() { } /> {/* Add this line */} } /> {/* Add this line */} } /> - + diff --git a/client/src/component/Contributors.jsx b/client/src/component/Contributors.jsx index 064fafa..84ffb66 100644 --- a/client/src/component/Contributors.jsx +++ b/client/src/component/Contributors.jsx @@ -13,11 +13,10 @@ const ContributorCard = ({ @@ -25,50 +24,43 @@ const ContributorCard = ({ {login}

{login}

{type}

{contributions} contributions
@@ -193,32 +186,29 @@ const StatCard = ({ label, value, icon, mode, onClick }) => ( initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5 }} - className={`rounded-lg p-6 flex items-center border transition-all duration-300 cup ${mode === 'dark' + className={`rounded-lg p-6 flex items-center border transition-all duration-300 cup ${mode === 'dark' ? 'bg-black/30 backdrop-blur-md border-white/10' : 'bg-white backdrop-blur-sm border-gray-300' }`} onClick={onClick} - + >
{icon}

{value}

{label}

@@ -246,24 +236,24 @@ export default function Contributor(props) { forks: 0, openIssues: 0, }); - + useEffect(() => { const fetchData = async () => { try { - // Fetch contributors + // Fetch contributors const contributorsResponse = await fetch("https://api.github.com/repos/Bitbox-Connect/Bitbox/contributors?page=1&per_page=100"); - + if (!contributorsResponse.ok) { throw new Error("Failed to fetch contributors data"); } const contributorsData = await contributorsResponse.json(); setContributors(contributorsData); - + // Fetch repo stats const repoResponse = await fetch('https://api.github.com/repos/Bitbox-Connect/Bitbox'); - + const repoData = await repoResponse.json(); setRepoStats({ stars: repoData.stargazers_count, @@ -285,7 +275,7 @@ export default function Contributor(props) { fetchData(); }, []); - // Calculate pagination indices + // Calculate pagination indices const indexOfLastItem = currentPage * itemsPerPage; const indexOfFirstItem = indexOfLastItem - itemsPerPage; @@ -297,33 +287,29 @@ export default function Contributor(props) { const paginate = (pageNumber) => setCurrentPage(pageNumber); - + return (
{/* Hero Section */}

Project Statistics

- - - - - } - onClick={() => { - setShowIssue(false); - setCurrentPage(1); // Reset pagination when switching to contributors - }} - /> - - - - } - /> - - - - } - /> - - - - } - onClick={() => { - setShowIssue(true); - setCurrentPage(1); // Reset pagination when switching to contributors - }} - /> + {/* Contributors */} +
+ + + + + } + onClick={() => { + setShowIssue(false); + setCurrentPage(1); // Reset pagination when switching to contributors + }} + /> +
+ + {/* Repository Stars */} + + + + + } + /> + + + {/* Repository Forks */} + + + + + } + /> + + + {/* Open Issues */} +
+ + + + } + onClick={() => { + setShowIssue(true); + setCurrentPage(1); // Reset pagination when switching to contributors + }} + /> +
-
+

{showIssue ? 'Your contribution is valuable see all Issues' : 'Contributors'}

@@ -481,6 +479,6 @@ export default function Contributor(props) {
- + ); } diff --git a/client/src/component/Faq.jsx b/client/src/component/Faq.jsx index ae2e048..15e299f 100644 --- a/client/src/component/Faq.jsx +++ b/client/src/component/Faq.jsx @@ -1,6 +1,6 @@ // component/FAQ.jsx -import React, { useState } from 'react'; -import './FAQ.css'; // Import the CSS file for styling +import { useState } from 'react'; +import '../css/Faq.css'; const FAQ = () => { const [activeIndex, setActiveIndex] = useState(null); diff --git a/client/src/component/Home.jsx b/client/src/component/Home.jsx index f172642..61ea268 100644 --- a/client/src/component/Home.jsx +++ b/client/src/component/Home.jsx @@ -232,7 +232,7 @@ const Home = (props) => { >

@@ -277,22 +277,22 @@ const Home = (props) => { {/* Works Section */}

What We Work On

- +
-
+
{worddata.map((word, index) => (