1- import React , { useEffect , useMemo } from "react" ;
1+ import React , { useEffect , useState , useMemo } from "react" ;
2+ import axios from "axios" ;
23import Particles , { initParticlesEngine } from "@tsparticles/react" ;
34import { loadFull } from "tsparticles" ;
45import Tilty from "react-tilty" ;
@@ -9,19 +10,32 @@ import Himank from "../assets/Himank.jpg";
910import Akshat from "../assets/Akshat.jpg" ;
1011import Shreya from "../assets/Shreya.jpg" ;
1112import Naman from "../assets/Naman.jpg" ;
12- import Footer from './Footer' ;
13- // import Tilty from "react-tilty";
13+ import Footer from "./Footer" ;
1414import { particles } from "./Particles.jsx" ;
1515import BackToTop from "./BottomToTop" ;
1616
1717const AboutUs = ( ) => {
18+ const [ contributors , setContributors ] = useState ( [ ] ) ;
1819
1920 useEffect ( ( ) => {
2021 initParticlesEngine ( async ( engine ) => {
2122 await loadFull ( engine ) ;
2223 } ) ;
2324 } , [ ] ) ;
2425
26+ useEffect ( ( ) => {
27+ const fetchContributors = async ( ) => {
28+ try {
29+ const response = await axios . get ( 'https://api.github.com/repos/Akshatchaube01/TimeWarp/contributors' ) ;
30+ setContributors ( response . data ) ;
31+ } catch ( error ) {
32+ console . error ( "Error fetching contributors:" , error ) ;
33+ }
34+ } ;
35+
36+ fetchContributors ( ) ;
37+ } , [ ] ) ;
38+
2539 const teamMembers = [
2640 {
2741 memberName : "Akshat Chaube" ,
@@ -76,25 +90,28 @@ const AboutUs = () => {
7690 </ p >
7791 </ div >
7892 < div className = "image-container image-container-one mr-8" >
79- < Tilty > < img
80- src = { aboutImage }
81- alt = "About us"
82- className = "ml-8 shadow-sm shadow-sky-600 about-image w-[500px] rounded-full hover:scale-[1.1] transition"
83- />
93+ < Tilty >
94+ < img
95+ src = { aboutImage }
96+ alt = "About us"
97+ className = "ml-8 shadow-sm shadow-sky-600 about-image w-[500px] rounded-full hover:scale-[1.1] transition"
98+ />
8499 </ Tilty >
85100 </ div >
86101 </ div >
87102
88103 < div className = "our-vision flex mb-28" >
89104 < div className = "image-container image-container-two" >
90- < Tilty > < img
91- src = { carImage }
92- alt = "About us"
93- className = " shadow-sm shadow-sky-600 about-image w-[500px] rounded-full hover:scale-[1.1] transition"
94- /> </ Tilty >
105+ < Tilty >
106+ < img
107+ src = { carImage }
108+ alt = "About us"
109+ className = "shadow-sm shadow-sky-600 about-image w-[500px] rounded-full hover:scale-[1.1] transition"
110+ />
111+ </ Tilty >
95112 </ div >
96113 < div className = "text-container mx-auto flex-1 text-left" >
97- < h1 className = "about-title rounded-md text-4xl text-center italic font-bold p-2 mb-8 bg-gradient-to-l from-sky-500" >
114+ < h1 className = "about-title rounded-md text-4xl text-center italic font-bold p-2 mb-8 bg-gradient-to-l from-sky-500" >
98115 Our Vision
99116 </ h1 >
100117 < p className = "about-text italic text-lg font-light text-justify" >
@@ -115,19 +132,68 @@ const AboutUs = () => {
115132 </ div >
116133 < div className = "grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 " >
117134 { teamMembers . map ( ( member , index ) => (
118- < Tilty key = { index } className = "w-full bg-sky-900/50 backdrop-blur-sm shadow-sky-100 rounded-lg shadow-lg p-12 flex flex-col justify-center items-center" glare scale = { 1.05 } maxGlare = { 0.5 } >
135+ < Tilty
136+ key = { index }
137+ className = "w-full bg-sky-900/50 backdrop-blur-sm shadow-sky-100 rounded-lg shadow-lg p-12 flex flex-col justify-center items-center"
138+ glare
139+ scale = { 1.05 }
140+ maxGlare = { 0.5 }
141+ >
119142 < div className = "mb-8" >
120- < img className = "object-center object-cover rounded-full h-36 w-36" src = { member . imgSrc } alt = { member . alt } />
143+ < img
144+ className = "object-center object-cover rounded-full h-36 w-36"
145+ src = { member . imgSrc }
146+ alt = { member . alt }
147+ />
121148 </ div >
122149 < div className = "text-center" >
123- < p className = "text-xl text-white font-bold mb-2" > { member . memberName } </ p >
150+ < p className = "text-xl text-white font-bold mb-2" >
151+ { member . memberName }
152+ </ p >
124153 </ div >
125154 </ Tilty >
126155 ) ) }
127156 </ div >
128157 </ section >
129158 </ div >
130159
160+ { /* OUR CONTRIBUTORS */ }
161+ < div className = "w-full" >
162+ < section className = "our-team-section max-w-6xl mx-auto px-4 sm:px-6 lg:px-4 py-12" >
163+ < div className = "rounded-md about-title text-4xl text-center italic font-bold p-2 mb-[5%] mt-[100px] bg-gradient-to-r from-sky-500 " >
164+ < h1 className = "our-team-heading font-bold text-3xl md:text-4xl lg:text-5xl font-heading text-white" >
165+ Our Contributors
166+ </ h1 >
167+ </ div >
168+ < div className = "marquee" >
169+ < div className = "marquee-content" >
170+ { contributors . map ( ( contributor , index ) => (
171+ < Tilty
172+ key = { index }
173+ className = "inline-block bg-sky-900/50 backdrop-blur-sm shadow-sky-100 rounded-lg shadow-lg p-12 flex flex-col justify-center items-center m-2"
174+ glare
175+ scale = { 1.05 }
176+ maxGlare = { 0.5 }
177+ >
178+ < div className = "mb-8" >
179+ < img
180+ className = "object-center object-cover rounded-full h-36 w-36"
181+ src = { contributor . avatar_url }
182+ alt = { contributor . login }
183+ />
184+ </ div >
185+ < div className = "text-center" >
186+ < p className = "text-xl text-white font-bold mb-2" >
187+ { contributor . login }
188+ </ p >
189+ </ div >
190+ </ Tilty >
191+ ) ) }
192+ </ div >
193+ </ div >
194+ </ section >
195+ </ div >
196+
131197 < Footer />
132198 </ div >
133199 ) ;
0 commit comments