refactor: update showProjectGallery state initialization and onClose handler for clarity

This commit is contained in:
2025-06-26 17:08:03 +02:00
parent 9e4a6a8c95
commit 5d93919fb2
+2 -2
View File
@@ -5,7 +5,7 @@ import { Github, Linkedin, Mail, ChevronDown, Code, Database, BarChart3, Globe,
const Portfolio = () => { const Portfolio = () => {
const [activeSection, setActiveSection] = useState('home'); const [activeSection, setActiveSection] = useState('home');
const [scrolled, setScrolled] = useState(false); const [scrolled, setScrolled] = useState(false);
const [showProjectGallery, setShowProjectGallery] = useState(false); const [showProjectGallery, setShowProjectGallery] = useState<Project | null>(null);
// Nord Color Palette // Nord Color Palette
const nordColors = { const nordColors = {
@@ -657,7 +657,7 @@ const Portfolio = () => {
{showProjectGallery && ( {showProjectGallery && (
<ProjectGallery <ProjectGallery
project={showProjectGallery} project={showProjectGallery}
onClose={() => setShowProjectGallery(false)} onClose={() => setShowProjectGallery(null)}
/> />
)} )}
</div> </div>