Skip to content

Commit 94fda8f

Browse files
committed
fix: minimal modern on click event
1 parent ac3e88b commit 94fda8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/MinimalModernProjectPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const MinimalModernProjectPage = () => {
166166
<span className="text-sm font-black uppercase tracking-widest">{activeSection?.id?.toUpperCase()}</span>
167167
</div>
168168
<div className={`w-12 h-12 border-2 ${themeClasses.border} flex items-center justify-center font-black`}>
169-
{sections.findIndex(s => s.id === activeSectionId) + 1}
169+
{activeSectionId ? sections.findIndex(s => s.id === activeSectionId) + 1 : '0'}
170170
</div>
171171
</div>
172172
</div>
@@ -176,7 +176,7 @@ const MinimalModernProjectPage = () => {
176176
{sections.map((section, idx) => (
177177
<motion.div
178178
key={section.id}
179-
onMouseEnter={() => setActiveSectionId(section.id)}
179+
onClick={() => setActiveSectionId(activeSectionId === section.id ? null : section.id)}
180180
className="group cursor-pointer relative"
181181
>
182182
<div className="flex items-center gap-6">

0 commit comments

Comments
 (0)