11import { Button } from 'antd'
2- import { useEffect , useRef , useState } from 'react'
2+ import { useEffect , useRef , useState , useMemo } from 'react'
33
44interface ProjectShowcaseProps {
55 title ?: string
@@ -116,13 +116,13 @@ export function ProjectShowcase({
116116 ] ;
117117
118118 // Create 5 columns with randomized images and durations
119- const columns = Array . from ( { length : 3 } ) . map ( ( _ , i ) => {
119+ const columns = useMemo ( ( ) => Array . from ( { length : 3 } ) . map ( ( _ , i ) => {
120120 // Shuffle images and pick 10 random ones
121121 const shuffled = [ ...images ] . sort ( ( ) => Math . random ( ) - 0.5 ) . slice ( 0 , 10 ) ;
122122 // Random duration between 40s and 80s
123123 const duration = 40 + Math . random ( ) * 40 ;
124124 return { images : shuffled , duration } ;
125- } ) ;
125+ } ) , [ ] ) ;
126126
127127 const techStack = [ 'Next.js' , 'TailwindCSS' , 'Iconify API' , 'Unsplash API' ] ;
128128
@@ -133,7 +133,7 @@ export function ProjectShowcase({
133133 { /* Left Column: Content */ }
134134 < div className = 'text-left space-y-8 lg:col-span-6' >
135135 { /* Tag */ }
136- < div className = 'inline-flex items-center px-3 py-1 rounded-full bg-blue -50 text-blue-600 text-sm font-medium' >
136+ < div className = 'inline-flex items-center px-3 py-1 rounded-full bg-indigo -50 text-indigo-700 text-sm font-medium' >
137137 { subTitle }
138138 </ div >
139139
@@ -183,10 +183,10 @@ export function ProjectShowcase({
183183 { /* Right Column: Browser Frame Visual */ }
184184 < div className = 'relative lg:col-span-6' >
185185 { /* Background Blob */ }
186- < div className = 'absolute -inset-4 bg-blue-100 /50 rounded-xl -z-10 blur-2xl' > </ div >
186+ < div className = 'absolute -inset-4 bg-indigo-200 /50 rounded-3xl z-0 blur-2xl' > </ div >
187187
188188 { /* Browser Window */ }
189- < div className = 'bg-white rounded-3xl shadow-2xl overflow-hidden border border-gray-200/50' >
189+ < div className = 'bg-white rounded-3xl shadow-xl overflow-hidden border border-gray-200/50 relative z-1 ' >
190190 { /* Browser Header */ }
191191 < div className = 'bg-gray-50 px-4 pt-4 flex items-center gap-2' >
192192 < div className = 'w-3 h-3 rounded-full bg-red-400' > </ div >
0 commit comments