11"use client" ;
22
33import { useState } from "react" ;
4- import Link from "next/link" ;
4+ import { usePlaces } from "@/hooks/use-places" ;
5+ import { routes } from "@/lib/data" ;
56
67const sections = [
78 { id : "mapa" , label : "Mapa" } ,
@@ -12,6 +13,7 @@ const sections = [
1213
1314export default function ExplorarPage ( ) {
1415 const [ activeSection , setActiveSection ] = useState ( "mapa" ) ;
16+ const { data : places , isLoading } = usePlaces ( ) ;
1517
1618 return (
1719 < div className = "min-h-screen" >
@@ -41,7 +43,7 @@ export default function ExplorarPage() {
4143 < h1 className = "font-serif text-3xl font-bold" > Mapa del Territorio</ h1 >
4244 < p className = "text-[#9ca3af]" > Explora Real del Monte a través de capas interactivas: histórico, turístico, cultural y económico.</ p >
4345 < div className = "aspect-video rounded-xl border border-[#2a2d35] bg-[#121418] flex items-center justify-center" >
44- < p className = "text-[#6b7280]" > Mapa interactivo — placeholder </ p >
46+ < p className = "text-[#6b7280]" > Mapa interactivo — próximamente </ p >
4547 </ div >
4648 </ div >
4749 ) }
@@ -50,20 +52,19 @@ export default function ExplorarPage() {
5052 < div className = "space-y-6" >
5153 < h1 className = "font-serif text-3xl font-bold" > Lugares</ h1 >
5254 < p className = "text-[#9ca3af]" > Descubre los puntos de interés del Pueblo Mágico.</ p >
53- < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" >
54- { [
55- "Museo de Medicina Laboral" ,
56- "Panteón Inglés" ,
57- "Parroquia de Nuestra Señora de la Asunción" ,
58- "Mina de Acosta" ,
59- "Plaza de la Constitución" ,
60- "Museo Paste" ,
61- ] . map ( ( place ) => (
62- < div key = { place } className = "border border-[#2a2d35] rounded-xl p-4 bg-[#121418] hover:border-[#c8a356] transition-colors" >
63- < p className = "font-medium" > { place } </ p >
64- </ div >
65- ) ) }
66- </ div >
55+ { isLoading ? (
56+ < div className = "text-[#6b7280]" > Cargando lugares...</ div >
57+ ) : (
58+ < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" >
59+ { places ?. map ( ( p ) => (
60+ < div key = { p . id } className = "border border-[#2a2d35] rounded-xl p-4 bg-[#121418] hover:border-[#c8a356] transition-colors" >
61+ < span className = "text-xs text-[#c8a356] font-medium" > { p . cat } </ span >
62+ < p className = "font-medium mt-1" > { p . name } </ p >
63+ < p className = "text-sm text-[#9ca3af] mt-1 line-clamp-2" > { p . description } </ p >
64+ </ div >
65+ ) ) }
66+ </ div >
67+ ) }
6768 </ div >
6869 ) }
6970
@@ -72,15 +73,12 @@ export default function ExplorarPage() {
7273 < h1 className = "font-serif text-3xl font-bold" > Rutas y Experiencias</ h1 >
7374 < p className = "text-[#9ca3af]" > Recorridos temáticos por el territorio.</ p >
7475 < div className = "grid grid-cols-1 md:grid-cols-2 gap-4" >
75- { [
76- { name : "Ruta del Paste" , desc : "Recorrido gastronómico por las pasteurías tradicionales" } ,
77- { name : "Ruta Minera" , desc : "Historia viva de las minas de Real del Monte" } ,
78- { name : "Ruta Cultural" , desc : "Museos, galerías y patrimonio arquitectónico" } ,
79- { name : "Ruta Ecoturística" , desc : "Senderos y áreas naturales alrededor del pueblo" } ,
80- ] . map ( ( ruta ) => (
76+ { routes . map ( ( ruta ) => (
8177 < div key = { ruta . name } className = "border border-[#2a2d35] rounded-xl p-6 bg-[#121418]" >
82- < h3 className = "font-medium" > { ruta . name } </ h3 >
83- < p className = "text-sm text-[#9ca3af] mt-1" > { ruta . desc } </ p >
78+ < span className = "text-xs text-[#c8a356] font-medium" > { ruta . category } </ span >
79+ < h3 className = "font-medium mt-1" > { ruta . name } </ h3 >
80+ < p className = "text-sm text-[#9ca3af] mt-1" > { ruta . description } </ p >
81+ < p className = "text-xs text-[#6b7280] mt-2" > { ruta . duration } · { ruta . distance } km</ p >
8482 </ div >
8583 ) ) }
8684 </ div >
@@ -92,7 +90,7 @@ export default function ExplorarPage() {
9290 < h1 className = "font-serif text-3xl font-bold" > Gemelo Digital</ h1 >
9391 < p className = "text-[#9ca3af]" > Réplica digital del territorio con datos en tiempo real.</ p >
9492 < div className = "aspect-video rounded-xl border border-[#2a2d35] bg-[#121418] flex items-center justify-center" >
95- < p className = "text-[#6b7280]" > Gemelo Digital 3D — placeholder </ p >
93+ < p className = "text-[#6b7280]" > Gemelo Digital 3D — próximamente </ p >
9694 </ div >
9795 </ div >
9896 ) }
0 commit comments