Skip to content

Commit

Permalink
Merge branch 'master' into add-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshgrover23 authored Sep 26, 2024
2 parents 6644dba + b9bb605 commit 5fee3c8
Show file tree
Hide file tree
Showing 20 changed files with 314 additions and 116 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions public/data/Jyothishree2k5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Jyothishree Rajkumar",
"location": "TamilNadu",
"bio": "I am a pre-final year IT student with knowledege in MERN stack and i do dsa in python. I am currently trying to do open source as it interests me the most.",
"avatar": "https://github.com/Jyothishree2k5.png",
"portfolio": "https://github.com/Jyothishree2k5",
"skills": ["HTML", "CSS", "JAVASCRIPT", "MONGODB", "NODEJS", "EXPRESSJS", "SQL"],
"social": {
"GitHub": "https://github.com/Jyothishree2k5",
"Twitter": "https://twitter.com/Jyothishree2k58",
"LinkedIn": "https://www.linkedin.com/in/jyothishree-rajkumar-055022243"
}
}
13 changes: 13 additions & 0 deletions public/data/Om-pawarr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Om pawar",
"location": "Maharashtra",
"bio": "A Web Developer specializing in HTML5,css, JavaScript, and front-end frameworks",
"avatar": "https://avatars.githubusercontent.com/u/124502159?s=400&u=3691e22cc07794bb421cee5c655dca4d8da244c9&v=4",
"portfolio": "",
"skills": ["Front end frameworks expertise", "AWS associate level certified", "..."],
"social": {
"GitHub": "https://github.com/Om-pawarr",
"Twitter": "https://twitter.com/@_Parth_Dwivedi_",
"LinkedIn": ""
}
}
13 changes: 13 additions & 0 deletions public/data/Saipradyumna Goud Chiragoni.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Chiragoni Sai Pradyumna Goud",
"location": "Telangana, India",
"bio": "I am an aspiring full stack developer and very sincere about my work. I am pursuing my B.Tech at Kakatiya Institute of Technology and Science, and I am an open source contributor.",
"avatar": "https://github.com/saipradyumnagoud.png",
"portfolio": "https://github.com/saipradyumnagoud",
"skills": ["HTML", "CSS", "JAVASCRIPT", "REACT", "EXPRESS", "NODE", "MONGODB", "SQL", "C", "JAVA"],
"social": {
"GitHub": "https://github.com/saipradyumnagoud",
"Twitter": "https://x.com/saipradyumnaaaa",
"LinkedIn": "https://www.linkedin.com/in/saipradyumnagoudch/"
}
}
13 changes: 13 additions & 0 deletions public/data/Sanket176.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Sanket Rinayat",
"location": "Gondia (MH), India",
"bio": "System Engineer @Infosys with 2 years of experience in web app development with industry standard. Interested in learning new technologies in new various environments with problem-solving attitude.",
"avatar": "https://github.com/Sanket176.png",
"portfolio": "https://github.com/Sanket176",
"skills": ["HTML", "CSS", "Javascript", "React", "NodeJS", "MongoDB", "Networking", "Problem Solving"],
"social": {
"GitHub": "https://github.com/Sanket176",
"My Portfolio": "https://66a7ce14a7aa1539cc2ec257--earnest-platypus-025bbc.netlify.app/",
"LinkedIn": "https://www.linkedin.com/in/sanket-rinayat-b253bb211"
}
}
28 changes: 28 additions & 0 deletions public/data/adityashah7867.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "Aditya Nikunj Shah",
"location": "Mumbai, India 🇮🇳",
"bio": "FULL STACK DEV",
"avatar": "https://adityadevappweb.s3.ap-south-1.amazonaws.com/Untitled+design.png",
"portfolio": "https://adityanshah.netlify.app/",
"skills": [
"Javascript",
"C++",
"Typescript",
"Nodejs",
"Expressjs",
"React",
"Next.Js",
"MySQL",
"MongoDB",
"Docker",
"Git",
"Tailwind CSS",
"REST APIs",
"GraphQL"
],
"social": {
"GitHub": "https://github.com/adityashah7867",
"LinkedIn": "https://www.linkedin.com/in/adi-tya-shah"
}
}

12 changes: 12 additions & 0 deletions public/data/boytur.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Piyawat Wongyat",
"location": "Bangkok/Thailand",
"bio": "I'm a software engineering student at Burapha University. I'm not very passionate about coding but work in this field to earn a living.",
"avatar": "https://avatars.githubusercontent.com/u/104257779?s=400&u=4e9c1cc0d7c1530af16a0293b5338375fb4af27e&v=4",
"portfolio": "https://piyawat-portfolio.onrender.com/",
"skills": ["React.js", "Express.js", "Tailwind", "TypeScript", "JavaScript", "Linux"],
"social": {
"GitHub": "https://github.com/boytur",
"LinkedIn": "https://www.linkedin.com/in/piyawat-wongyat-a74b52270/"
}
}
25 changes: 25 additions & 0 deletions public/data/dylan-dot-c.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Dylan Heslop",
"location": "New York, USA",
"bio": "Full Stack Software Developer, specializes in React, Vue, Supabase, TypsScript, Node.JS. Love making functional web applications and learning new things everyday.",
"avatar": "https://github.com/dylan-dot-c.png",
"portfolio": "https://www.frontendmentor.io/profile/dylan-dot-c",
"skills": [
"HTML",
"CSS",
"JS",
"TypeScript",
"React",
"Vue",
"Supabase",
"Python",
"Node.JS",
"Flask",
"Responsive Web Design",
"Mobile-First Design"
],
"social": {
"GitHub": "https://github.com/dylan-dot-c",
"LinkedIn": "https://www.linkedin.com/in/heslopd23/"
}
}
12 changes: 12 additions & 0 deletions public/data/giuliarappo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Giulia",
"location": "Italy",
"bio": "Junior fullstack delevoper searching a project to collaborate for improve skills",
"avatar": "https://github.com/giuliarappo.png",
"portfolio": "https://github.com/giuliarappo",
"skills": ["Java", "Spring boot", "Angular", "React"],
"social": {
"GitHub": "https://github.com/<giuliarappo>",
"LinkedIn": "https://www.linkedin.com/in/<giulia-rappo>"
}
}
13 changes: 13 additions & 0 deletions public/data/mayurr7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Mayur Tekale",
"location": "Maharashtra, India",
"bio": "A passionate web developer from India.",
"avatar": "https://avatars.githubusercontent.com/u/147367560?s=400&u=fc01c0ff31e5b5d0f5bddd5e9a99ba5d7d2634fa&v=4",
"portfolio": "https://mayurr7.github.io/mayurPortfolio/",
"skills": ["HTML5", "CSS3", "JavaScript", "ReactJs", "TailwindCss", "NodeJs", "Java", "DSA"],
"social": {
"GitHub": "https://github.com/mayurr7",
"Twitter": "https://twitter.com/mayur_b_tekale",
"LinkedIn": "https://www.linkedin.com/in/mayur-tekale-1540a023b"
}
}
13 changes: 13 additions & 0 deletions public/data/samah554.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Samah Shakir Ali",
"location": "India",
"bio": "CS Grad, Web dev, Full Stack Developer expertise in .Net and MERN Stack",
"avatar": "https://github.com/samah554.png",
"portfolio": "https://getssa.framer.website",
"skills": ["Javascript", "ReactJS", "Node.js", ".Net", "MongoDB", "MySql", "MSSql", "C#", "RestApi", "Express.js"],
"social": {
"GitHub": "https://github.com/samah554",
"Twitter": "https://twitter.com/samah554>",
"LinkedIn": "https://www.linkedin.com/in/samahshakir"
}
}
27 changes: 27 additions & 0 deletions public/data/swarnendu19.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Swarnendu Maity",
"location": "India",
"bio": "Aspiring Full Stack Developer | Integrating Frontend Proficiency with Expanding Backend Knowledge",
"avatar": "https://github.com/swarnendu19.png",
"portfolio": "https://github.com/swarnendu19",
"skills": [
"HTML",
"CSS",
"JavaScript",
"ReactJS",
"Redux Toolkit",
"SASS",
"TailwindCSS",
"NodeJS",
"ExpressJS",
"MongoDB",
"Docker",
"Git",
"GitHub"
],
"social": {
"GitHub": "https://github.com/swarnendu19",
"Twitter": "https://x.com/swarnendu_dev",
"LinkedIn": "https://www.linkedin.com/in/swarnendu-maity-34111624b/"
}
}
13 changes: 13 additions & 0 deletions public/data/tainguyenphat74.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tainguyenphat74",
"location": "Viet Nam",
"bio": "Fullstack Software Engineer with 3+ years. Lovely build SaaS product.",
"avatar": "https://github.com/tainguyenphat74.png",
"portfolio": "https://github.com/tainguyenphat74",
"skills": ["Next.js", "TailwindCSS", "Java", "Quarkus", "Docker"],
"social": {
"GitHub": "https://github.com/tainguyenphat74",
"Twitter": "https://twitter.com/tainguyenphat74",
"LinkedIn": "https://www.linkedin.com/in/tainguyenphat74"
}
}
13 changes: 13 additions & 0 deletions public/data/vitormarinheiro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Vitor Marinheiro",
"location": "São Paulo - Brasil",
"bio": "Hello, my name is Vitor Marinheiro and I'am Frontend Developer. My motivation is to solve problems and be involved in projects where I can apply my knowledge and learn continuously. In my free time, I enjoy contributing to open source projects and helping others get involved in programming.",
"avatar": "https://github.com/vitormarinheiro1.png",
"portfolio": "https://vitormarinheiro.vercel.app/",
"skills": ["React", "Nextjs", "Angular", "Typescript", "Python", "Nest", "MySQL"],
"social": {
"GitHub": "https://github.com/vitormarinheiro1",
"Twitter": "#",
"LinkedIn": "https://br.linkedin.com/in/vitor-marinheiro-590a461ba"
}
}
41 changes: 25 additions & 16 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function App() {
const recordsPerPage = 20;

const currentUrl = window.location.pathname;

useEffect(() => {
const fetchData = async (file) => {
try {
Expand All @@ -36,7 +37,7 @@ function App() {
setLoadingProfiles(true);
try {
const promises = filenames.map((file) => fetchData(`/data/${file}`));
const combinedData = await Promise.all(promises);
const combinedData = await Promise.all(promises).then((results) => results.flat());
setCombinedData(combinedData);
setShuffledProfiles(shuffleProfiles(combinedData));
} catch (error) {
Expand All @@ -58,26 +59,34 @@ function App() {
return array;
};

const handleSearch = (searchValue) => {
const lowercaseSearch = searchValue.toLowerCase().trim();
const results = combinedData.filter((object) => {
const lowercaseName = object.name.toLowerCase();
const lowercaseLocation = object.location.toLowerCase();
const matchingSkills = object.skills.filter((skill) => skill.toLowerCase().includes(lowercaseSearch));
return (
matchingSkills.length > 0 ||
lowercaseName.includes(lowercaseSearch) ||
lowercaseLocation.includes(lowercaseSearch)
);
const handleSearch = ({ value, criteria }) => {
const normalizeString = (str) =>
str
.toLowerCase()
.replace(/\s*,\s*/g, ' ')
.replace(/\s+/g, ' ')
.trim();

const normalizedValue = normalizeString(value);

const filteredResults = combinedData.filter((user) => {
if (criteria === 'name') {
return normalizeString(user.name).includes(normalizedValue);
} else if (criteria === 'location') {
return normalizeString(user.location).includes(normalizedValue);
} else if (criteria === 'skill') {
return user.skills.some((skill) => normalizeString(skill).includes(normalizedValue));
}
return false;
});

setSearching(true);
setProfiles(results);
setProfiles(filteredResults);
setCurrentPage(1);
setSearching(true);
};

const handleNextPage = () => {
const totalPages = Math.ceil((searching ? profiles.length : combinedData.length) / recordsPerPage);
const totalPages = Math.ceil((searching ? profiles.length : shuffledProfiles.length) / recordsPerPage);
if (currentPage < totalPages) {
setCurrentPage(currentPage + 1);
}
Expand Down Expand Up @@ -125,7 +134,7 @@ function App() {
<div className="w-full pl-5 pr-4 md:h-screen md:w-[77%] md:overflow-y-scroll md:py-7" ref={profilesRef}>
<Search onSearch={handleSearch} />
{profiles.length === 0 && searching ? <NoResultFound /> : renderProfiles()}
{combinedData.length > 0 && (
{(searching ? profiles.length : shuffledProfiles.length) > 0 && (
<Pagination
currentPage={currentPage}
totalPages={Math.ceil((searching ? profiles.length : shuffledProfiles.length) / recordsPerPage)}
Expand Down
14 changes: 14 additions & 0 deletions src/ProfilesList.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[
"samah554.json",
"mayurr7.json",
"vitormarinheiro.json",
"AndresFelipe077.json",
"Anshgrover23.json",
"adityashah7867.json",
"swarnendu19.json",
"hassanaboukhalil.json",
"Asmar-Ali.json",
"euotiniel.json",
Expand Down Expand Up @@ -40,6 +45,7 @@
"abhishek19-dev.json",
"Sch476.json",
"Yash636261.json",
"Jyothishree2k5.json",
"niranjan-kurhade.json",
"Rakshit-gen.json",
"gayatri-p786.json",
Expand Down Expand Up @@ -430,4 +436,12 @@
"why-deepanshux.json",
"joselucasapp.json",
"AnkitMourya12.json"
"AnkitMourya12.json",
"tainguyenphat74.json",
"Saipradyumna Goud Chiragoni.json",
"dylan-dot-c.json",
"Sanket176.json",
"Om-pawarr.json",
"boytur.json",
"giuliarappo.json"
]
Loading

0 comments on commit 5fee3c8

Please sign in to comment.