diff --git a/src/App.js b/src/App.js index 1f6df9f..da7b1d9 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,7 @@ import { ThemeProvider } from "./themeContext"; import ContactUs from "./pages/ContactUs"; import EditProfile from "./pages/EditProfile"; import OtpVerify from "./pages/OtpVerify"; +import Contributors from "./pages/Contributors"; const Layout = ({ children }) => { return ( @@ -54,6 +55,7 @@ function App() { } /> } /> } /> + }/> {token ? ( News +
  • + Our Contributors +
  • © 2024-2025 Foodies™. All Rights Reserved. diff --git a/src/pages/Contributors.jsx b/src/pages/Contributors.jsx new file mode 100644 index 0000000..7c75672 --- /dev/null +++ b/src/pages/Contributors.jsx @@ -0,0 +1,58 @@ +import React, { useEffect, useState } from 'react'; +import axios from 'axios'; +import Navbar from '../components/Navbar'; +import Footer from '../components/Footer'; +function Contributors() { + const [contributors, setContributors] = useState([]); + useEffect(() => { + async function Contributors() { + try { + const response = await axios.get( + 'https://api.github.com/repos/VanshKing30/FoodiesWeb/contributors' + ); + setContributors(response.data); + } catch (error) { + console.error('Error in fetching contributors:', error); + } + } + Contributors(); + }, []); + return ( +
    + +

    + Contributors +

    +
    + {contributors.map((contributor) => ( +
    + + {contributor.login} + +

    + {contributor.login} +

    +

    + Contributions: {contributor.contributions} +

    +
    + ))} +
    +
    + ); +} + +export default Contributors; \ No newline at end of file