diff --git a/client/src/App.tsx b/client/src/App.tsx index dfb95e4..a874437 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -27,6 +27,7 @@ import { AnimatePresence } from "framer-motion"; import CustomSwitch from "./lib/custom-switch"; import Privacy from "./pages/Privacy"; import Terms from "./pages/Terms"; +import AboutPage from "./pages/About"; const queryClient = new QueryClient(); @@ -46,6 +47,7 @@ function App() { } /> + } /> } /> } /> } /> diff --git a/client/src/lib/custom-switch.tsx b/client/src/lib/custom-switch.tsx index 27ef5a4..d7c69d7 100644 --- a/client/src/lib/custom-switch.tsx +++ b/client/src/lib/custom-switch.tsx @@ -12,7 +12,6 @@ const CustomSwitch = ({ children }: { children: React.ReactNode }) => { setProgress(true); if (location.pathname === prevLoc) { setPrevLoc(""); - //thanks to ankit sahu } }, [location]); diff --git a/client/src/pages/About.tsx b/client/src/pages/About.tsx new file mode 100644 index 0000000..1da19c2 --- /dev/null +++ b/client/src/pages/About.tsx @@ -0,0 +1,114 @@ +import { useEffect, useState } from "react"; +import axios from "axios"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import { Badge } from "@/components/ui/badge"; +import Footer from "@/components/Footer"; +import Navbar from "@/components/Navbar"; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Link } from "react-router-dom"; +import Separator from "@/components/Separator"; + +interface Contributor { + login: string; + avatar_url: string; + html_url: string; + contributions: number; +} + +export default function AboutPage() { + const [contributors, setContributors] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + const fetchContributors = async () => { + try { + const repoOwner = "kom-senapati"; + const repoName = "bot-verse"; + const response = await axios.get( + `https://api.github.com/repos/${repoOwner}/${repoName}/contributors` + ); + setContributors(response.data); + } catch (error) { + console.error("Error fetching contributors:", error); + } finally { + setLoading(false); + } + }; + + fetchContributors(); + }, []); + + return ( + <> + +
+

About Bot Verse

+

+ Bot Verse is a platform designed to provide an enhanced user + experience through a series of "Magic Tools." From OCR and translation + to text-to-speech, Bot Verse enables users to interact with AI-powered + tools in an intuitive way. +

+ + +
+

Meet the Contributors

+ + + {loading ? ( +

Loading contributors...

+ ) : ( +
+ {contributors.map((contributor) => ( + <> + + + + + + + {contributor.login.substring(0, 2)} + + + + +

{contributor.login}

+
+
+ + + {contributor.contributions} contributions + + + + + + + +
+ + ))} +
+ )} +
+
+ +