Skip to content

Commit

Permalink
Merge pull request #69 from P-DR0ZD/gh-35
Browse files Browse the repository at this point in the history
Maded the filter labels responsive from issue #35
  • Loading branch information
AnkitaMalik22 authored Oct 18, 2022
2 parents c776893 + b814def commit 39b3b70
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,36 @@ import AOS from "aos";
import "aos/dist/aos.css";
import Typewriter from 'typewriter-effect';


export default function Home() {
const [display, setDisplay] = useState("absolute");
const [lang, setLang] = useState();
// let languages=new Set();
// let langs=Array.from(languages)
const [profilesList, setProfiles] = useState();
let languages=new Set();

// function addSkill(skill){
// languages.add(skill)
// }
//Used to make sure that the inputs in profile.js are consitent for example html is equal to HTML
function checkLang(skill){
return skill.toUpperCase() == lang.toUpperCase();
}

// useEffect(() => {
// setLang(Array.from(languages))
// console.log(langs)
// },[addSkill])
useEffect(() => {
setLang(lang)
languages.add(lang)
let tmpList=[];
if(typeof(lang) != "undefined")
{
profiles.map((data, index) => {
if(data.skills.find(checkLang))
{
tmpList.push(data);
}
})
setProfiles(tmpList);
}
else
{
setProfiles(profiles);
}
})

useEffect(() => {
AOS.init()
Expand Down Expand Up @@ -135,7 +150,7 @@ export default function Home() {

{/* added animations */}
<div data-aos="fade-up" data-aos-duration="1500" data-aos-anchor-placement="top-center" className={styles.grid}>
{profiles && profiles.map((data, index) => {
{profilesList && profilesList.map((data, index) => {
return (
<ProfileCard data={data} key={index} />
)
Expand Down

1 comment on commit 39b3b70

@vercel
Copy link

@vercel vercel bot commented on 39b3b70 Oct 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

devmate – ./

devmate-ankitamalik22.vercel.app
devmate-git-main-ankitamalik22.vercel.app
devmate.vercel.app

Please sign in to comment.