Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tech.jsx #135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions src/components/Tech.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,35 @@ import { BallCanvas } from "./canvas";
import { SectionWrapper } from "../hoc";
import { technologies } from "../constants";


const Tech = () => {
return (
<div className='flex flex-row flex-wrap justify-center gap-10'>
{technologies.map((technology) => (
const isMobile = window.matchMedia("(max-width: 500px)").matches;
const Map = (isMobile ,technologies)=>{
if(isMobile){
return(
technologies.slice(0,4).map((technology)=>(
<div className='w-28 h-28' key={technology.name}>
<BallCanvas icon={technology.icon}/>
<p className="flex justify-center text-white font-bold">{technology.name}</p>
</div>
)))
}
else{return(
technologies.map((technology)=>(
<div className='w-28 h-28' key={technology.name}>
<BallCanvas icon={technology.icon} />
<BallCanvas icon={technology.icon}/>
<p className="flex justify-center text-white font-bold">{technology.name}</p>
</div>
))}
)))
}
}
return (
<>
<h1 className='font-bold flex justify-center text-lg mb-5 text-[#915EFF]'>My Tech Stack</h1>
<div className='flex flex-row flex-wrap justify-center gap-10'>
{Map(isMobile ,technologies)}
</div>
</>
);
};

Expand Down