"use client"; import { useState } from 'react'; import { motion } from 'framer-motion'; import { Code2Icon, ServerIcon, LayoutDashboardIcon, PenToolIcon } from 'lucide-react'; interface SkillsProps { skills: string[]; } // Skill proficiency data (this would normally come from a backend/database) const SKILL_PROFICIENCY: Record = { "C": 95, "C++": 90, "JavaScript": 85, "TypeScript": 80, "Html": 90, "Tailwind Css": 85, "React": 80, "Node.js/Next.js": 75, "Docker": 70, "Git": 85, "Jira": 80, }; // Categorized skills const SKILL_CATEGORIES = { "Languages": ["C", "C++", "JavaScript", "TypeScript"], "Frontend": ["Html", "Tailwind Css", "React", "Redux"], "Backend": ["Node.js/Next.js", "Docker"], "DevOps & Tools": ["Git", "Docker", "Jira"] }; const SkillsSection: React.FC = ({ skills }) => { const [activeCategory, setActiveCategory] = useState("All"); const categories = [ { id: "All", label: "All Skills", icon: }, { id: "Languages", label: "Languages", icon: }, { id: "Frontend", label: "Frontend", icon: }, { id: "Backend", label: "Backend", icon: }, { id: "DevOps & Tools", label: "DevOps & Tools", icon: }, ]; const filteredSkills = activeCategory === "All" ? Object.values(SKILL_CATEGORIES).flat() // get all skills from categories : SKILL_CATEGORIES[activeCategory as keyof typeof SKILL_CATEGORIES] || []; const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1, when: "beforeChildren" }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: "easeOut" }, }, }; // Function to get devicon class const getDeviconClass = (skill: string): string => { const skillLower = skill.toLowerCase().replace(/\./g, '').replace(/\s/g, ''); // Map special cases const skillMap: Record = { "c": "c", "c++": "cplusplus", "html": "html5", "tailwind css": "tailwindcss", "javascript": "javascript", "typescript": "typescript", "react": "react", "redux": "redux", "nodejs/nextjs": "nextjs", "jira": "jira", "docker": "docker", "git": "git", }; return skillMap[skillLower] || skillLower; }; return (

My Skills

A curated collection of my technical skills and proficiencies developed through education, personal projects, and hands-on experience.

{/* Category Filter */} {categories.map((category) => ( setActiveCategory(category.id)} whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} > {category.icon} {category.label} ))} {/* Skills Grid */} {filteredSkills.map((skill, index) => { const proficiency = SKILL_PROFICIENCY[skill] || 75; const deviconClass = getDeviconClass(skill); return (

{skill}

Proficiency {proficiency}%
); })}
{/* Additional Skills Section */}

Additional Skills & Methodologies

{[ // "Git", // "Docker", "Linux", "Socket Programming", "Project Management", "Problem Solving", "Agile Methodology", "Scrum", // "Jira", "Team Collaboration", "CI/CD", "Code Review", "Test-Driven Development", "RESTful APIs", "System Design", "Technical Documentation" ].map((skill, index) => ( {skill} ))}
); }; export default SkillsSection;