diff --git a/src/pages/Developers.tsx b/src/pages/Developers.tsx index 6cb8125..a92f4e2 100644 --- a/src/pages/Developers.tsx +++ b/src/pages/Developers.tsx @@ -1,7 +1,40 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { Code, GitBranch, Users, MessageSquare } from 'lucide-react'; +// Define the type for a developer's GitHub data +type Developer = { + id: number; + login: string; + name: string | null; + avatar_url: string; + html_url: string; +}; + export default function Developers() { + const [developers, setDevelopers] = useState([]); + + useEffect(() => { + const fetchDevelopers = async () => { + const githubUsernames = ["eshanized", "alokified", "utkarshift"]; // Replace with actual GitHub usernames + try { + const developerData = await Promise.all( + githubUsernames.map(async (username) => { + const response = await fetch(`https://api.github.com/users/${username}`); + if (!response.ok) { + throw new Error(`Failed to fetch data for ${username}`); + } + return response.json(); + }) + ); + setDevelopers(developerData); + } catch (error) { + console.error("Error fetching developer data:", error); + } + }; + + fetchDevelopers(); + }, []); + return (
@@ -13,49 +46,82 @@ export default function Developers() {

- {/* Get Involved Section */} -
-
- -

Get Involved

-

- There are many ways to contribute to Kali Linux. Whether you're a developer, security researcher, or documentation writer, your contributions are valuable. -

-
    -
  • - - Submit pull requests -
  • -
  • - - Report bugs -
  • -
  • - - Join discussions -
  • -
-
- -
-

Development Resources

- + {/* Meet the Developers Section */} +
+

Meet the Developers

+
+ {developers.length > 0 ? ( + developers.map((developer) => ( +
+ {developer.login} +

{developer.name || developer.login}

+

@{developer.login}

+ + View Profile + +
+ )) + ) : ( +

Loading developer information...

+ )}
+ {/* Get Involved and Development Resources Section */} +
+ {/* Get Involved Section */} +
+ +

Get Involved

+

+ There are many ways to contribute to Kali Linux. Whether you're a developer, security researcher, or documentation writer, your contributions are valuable. +

+
    +
  • + + Submit pull requests +
  • +
  • + + Report bugs +
  • +
  • + + Join discussions +
  • +
+
+ + {/* Development Resources Section */} + +
+ + {/* Current Projects */}

Current Projects

@@ -100,4 +166,4 @@ export default function Developers() {
); -} \ No newline at end of file +}