Skip to content

Commit feb14dc

Browse files
committed
feat: Make entire heritage cards clickable on /explore page
**UX Improvement**: Entire card now clickable instead of just bottom link **Changes**: - Wrapped featured cards in Link component - Wrapped grid cards in Link component - Added cursor-pointer class for visual feedback - Converted 'Explore Culture' link to span (parent Link handles navigation) - Entire card surface is now clickable for better UX **Benefits**: - Larger click target (entire card vs just bottom link) - More intuitive interaction (users expect cards to be clickable) - Better mobile experience (easier to tap) - Follows common card UI patterns Build: Successful ✅
1 parent f02782f commit feb14dc

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

src/components/pages/ExploreContent.tsx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,18 @@ export default function ExploreContent() {
199199
</h3>
200200
<div className="grid md:grid-cols-2 gap-8">
201201
{featured.map((item, index) => (
202-
<motion.div
202+
<Link
203203
key={item.id}
204-
initial={{ opacity: 0, y: 30 }}
205-
whileInView={{ opacity: 1, y: 0 }}
206-
transition={{ duration: 0.6, delay: index * 0.1 }}
207-
className="culture-card group p-0 overflow-hidden"
204+
href={`/heritage/${item.dTag}`}
205+
className="block"
208206
>
209-
<div className="relative aspect-video">
207+
<motion.div
208+
initial={{ opacity: 0, y: 30 }}
209+
whileInView={{ opacity: 1, y: 0 }}
210+
transition={{ duration: 0.6, delay: index * 0.1 }}
211+
className="culture-card group p-0 overflow-hidden cursor-pointer"
212+
>
213+
<div className="relative aspect-video">
210214
<Image
211215
src={item.image}
212216
alt={`Cultural scene representing ${item.name}`}
@@ -275,17 +279,14 @@ export default function ExploreContent() {
275279
</div>
276280
<div className="flex items-center justify-between">
277281
<span className="text-sm text-gray-500">{item.relativeTime}</span>
278-
<Link
279-
href={`/heritage/${item.dTag}`}
280-
className="text-primary-800 font-medium hover:text-accent-600 transition-colors duration-200 flex items-center w-full justify-center py-2"
281-
aria-label={`Explore culture: ${item.name}`}
282-
>
282+
<span className="text-primary-800 font-medium group-hover:text-accent-600 transition-colors duration-200 flex items-center w-full justify-center py-2">
283283
Explore Culture
284284
<ArrowRight className="w-4 h-4 ml-2" />
285-
</Link>
285+
</span>
286286
</div>
287287
</div>
288288
</motion.div>
289+
</Link>
289290
))}
290291
</div>
291292
</div>
@@ -299,14 +300,18 @@ export default function ExploreContent() {
299300
</h3>
300301
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
301302
{grid.map((item, index) => (
302-
<motion.div
303+
<Link
303304
key={item.id}
304-
initial={{ opacity: 0, y: 30 }}
305-
whileInView={{ opacity: 1, y: 0 }}
306-
transition={{ duration: 0.6, delay: index * 0.1 }}
307-
className="culture-card group"
305+
href={`/heritage/${item.dTag}`}
306+
className="block"
308307
>
309-
<div className="relative aspect-video overflow-hidden">
308+
<motion.div
309+
initial={{ opacity: 0, y: 30 }}
310+
whileInView={{ opacity: 1, y: 0 }}
311+
transition={{ duration: 0.6, delay: index * 0.1 }}
312+
className="culture-card group cursor-pointer"
313+
>
314+
<div className="relative aspect-video overflow-hidden">
310315
<Image
311316
src={item.image}
312317
alt={`Cultural scene representing ${item.name}`}
@@ -351,16 +356,13 @@ export default function ExploreContent() {
351356
</span>
352357
)}
353358
</div>
354-
<Link
355-
href={`/heritage/${item.dTag}`}
356-
className="text-primary-800 font-medium hover:text-accent-600 transition-colors duration-200 flex items-center w-full justify-center py-2"
357-
aria-label={`Explore culture: ${item.name}`}
358-
>
359+
<span className="text-primary-800 font-medium group-hover:text-accent-600 transition-colors duration-200 flex items-center w-full justify-center py-2">
359360
Explore Culture
360361
<ArrowRight className="w-4 h-4 ml-2" />
361-
</Link>
362+
</span>
362363
</div>
363364
</motion.div>
365+
</Link>
364366
))}
365367
</div>
366368
</div>

0 commit comments

Comments
 (0)