From 9e4a6a8c95b5b91b4a672130709bd136cc2f758f Mon Sep 17 00:00:00 2001 From: Quinta <0pietroquintavalle0@gmail.com> Date: Thu, 26 Jun 2025 17:05:33 +0200 Subject: [PATCH] refactor: add TypeScript types to scrollToSection and ProjectGallery components --- app/page.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index cd8c797..6ac80dc 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -118,12 +118,17 @@ const Portfolio = () => { 'Python for Data Science, AI & Development' ]; - const scrollToSection = (sectionId) => { + const scrollToSection = (sectionId: string) => { document.getElementById(sectionId)?.scrollIntoView({ behavior: 'smooth' }); setActiveSection(sectionId); }; - const ProjectGallery = ({ project, onClose }) => ( + type Project = typeof projects[number]; + interface ProjectGalleryProps { + project: Project; + onClose: () => void; + } + const ProjectGallery: React.FC = ({ project, onClose }) => (