@@ -135,43 +135,58 @@ interface TemplateCardProps {
135135// Skeleton component for loading states
136136export function TemplateCardSkeleton ( { className } : { className ?: string } ) {
137137 return (
138- < div className = { cn ( 'rounded-[14px] border bg-card shadow-xs' , 'flex h-38 ' , className ) } >
138+ < div className = { cn ( 'rounded-[14px] border bg-card shadow-xs' , 'flex h-[142px] ' , className ) } >
139139 { /* Left side - Info skeleton */ }
140140 < div className = 'flex min-w-0 flex-1 flex-col justify-between p-4' >
141141 { /* Top section skeleton */ }
142- < div className = 'space-y-3' >
143- < div className = 'flex min-w-0 items-center gap-2.5' >
144- { /* Icon skeleton */ }
145- < div className = 'h-5 w-5 flex-shrink-0 animate-pulse rounded bg-gray-200' />
146- { /* Title skeleton */ }
147- < div className = 'h-4 w-24 animate-pulse rounded bg-gray-200' />
142+ < div className = 'space-y-2' >
143+ < div className = 'flex min-w-0 items-center justify-between gap-2.5' >
144+ < div className = 'flex min-w-0 items-center gap-2.5' >
145+ { /* Icon skeleton */ }
146+ < div className = 'h-5 w-5 flex-shrink-0 animate-pulse rounded-md bg-gray-200' />
147+ { /* Title skeleton */ }
148+ < div className = 'h-4 w-32 animate-pulse rounded bg-gray-200' />
149+ </ div >
150+
151+ { /* Star and Use button skeleton */ }
152+ < div className = 'flex flex-shrink-0 items-center gap-3' >
153+ < div className = 'h-4 w-4 animate-pulse rounded bg-gray-200' />
154+ < div className = 'h-6 w-10 animate-pulse rounded-md bg-gray-200' />
155+ </ div >
148156 </ div >
149157
150158 { /* Description skeleton */ }
151- < div className = 'space-y-2 ' >
159+ < div className = 'space-y-1.5 ' >
152160 < div className = 'h-3 w-full animate-pulse rounded bg-gray-200' />
153- < div className = 'h-3 w-3/4 animate-pulse rounded bg-gray-200' />
154- < div className = 'h-3 w-1/2 animate-pulse rounded bg-gray-200' />
161+ < div className = 'h-3 w-4/5 animate-pulse rounded bg-gray-200' />
162+ < div className = 'h-3 w-3/5 animate-pulse rounded bg-gray-200' />
155163 </ div >
156164 </ div >
157165
158166 { /* Bottom section skeleton */ }
159- < div className = 'flex min-w-0 items-center gap-1.5' >
160- < div className = 'h-3 w-8 animate-pulse rounded bg-gray-200' />
167+ < div className = 'flex min-w-0 items-center gap-1.5 pt-1.5 ' >
168+ < div className = 'h-3 w-6 animate-pulse rounded bg-gray-200' />
161169 < div className = 'h-3 w-16 animate-pulse rounded bg-gray-200' />
162- < div className = 'h-3 w-1 animate-pulse rounded bg-gray-200' />
170+ < div className = 'h-2 w-1 animate-pulse rounded bg-gray-200' />
163171 < div className = 'h-3 w-3 animate-pulse rounded bg-gray-200' />
164172 < div className = 'h-3 w-8 animate-pulse rounded bg-gray-200' />
173+ { /* Stars section - hidden on smaller screens */ }
174+ < div className = 'hidden flex-shrink-0 items-center gap-1.5 sm:flex' >
175+ < div className = 'h-2 w-1 animate-pulse rounded bg-gray-200' />
176+ < div className = 'h-3 w-3 animate-pulse rounded bg-gray-200' />
177+ < div className = 'h-3 w-6 animate-pulse rounded bg-gray-200' />
178+ </ div >
165179 </ div >
166180 </ div >
167181
168- { /* Right side - Blocks skeleton */ }
169- < div className = 'flex w-16 flex-col gap-1 rounded-r-[14px] border-border border-l bg-secondary p-2' >
170- { Array . from ( { length : 4 } ) . map ( ( _ , index ) => (
171- < div key = { index } className = 'flex items-center gap-1.5' >
172- < div className = 'h-3 w-3 animate-pulse rounded bg-gray-200' />
173- < div className = 'h-3 w-12 animate-pulse rounded bg-gray-200' />
174- </ div >
182+ { /* Right side - Block Icons skeleton */ }
183+ < div className = 'flex w-16 flex-col items-center justify-center gap-2 rounded-r-[14px] border-border border-l bg-secondary p-2' >
184+ { Array . from ( { length : 3 } ) . map ( ( _ , index ) => (
185+ < div
186+ key = { index }
187+ className = 'animate-pulse rounded bg-gray-200'
188+ style = { { width : '30px' , height : '30px' } }
189+ />
175190 ) ) }
176191 </ div >
177192 </ div >
0 commit comments