Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions front/src/app/embalse-provincia/array-provincias.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
export const provincias = [
"Álava",
"Albacete",
"Alicante",
"Almería",
"Asturias",
"Ávila",
"Badajoz",
"Baleares",
"Barcelona",
"Burgos",
"Cáceres",
"Cádiz",
"Cantabria",
"Castellón",
"Ciudad Real",
"Córdoba",
"La Coruña",
"Cuenca",
"Gerona",
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The province name "Gerona" uses the Spanish (Castilian) form rather than the Catalan official name "Girona". While both are acceptable, consider using the official Catalan form "Girona" for consistency with the constitutional name of the province. The same applies to "Lérida" (line 30) which should be "Lleida".

Copilot uses AI. Check for mistakes.
"Granada",
"Guadalajara",
"Guipúzcoa",
"Huelva",
"Huesca",
"Jaén",
"La Rioja",
"Las Palmas",
"León",
"Lérida",
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The province name "Lérida" uses the Spanish (Castilian) form rather than the Catalan official name "Lleida". While both are acceptable, consider using the official Catalan form "Lleida" for consistency with the constitutional name of the province.

Suggested change
"Lérida",
"Lleida",

Copilot uses AI. Check for mistakes.
"Lugo",
"Madrid",
"Málaga",
"Murcia",
"Navarra",
"Orense",
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The province name "Orense" uses the Spanish (Castilian) form rather than the Galician official name "Ourense". While both are acceptable, consider using the official Galician form "Ourense" for consistency with the constitutional name of the province.

Suggested change
"Orense",
"Ourense",

Copilot uses AI. Check for mistakes.
"Palencia",
"Pontevedra",
"Salamanca",
"Santa Cruz de Tenerife",
"Segovia",
"Sevilla",
"Soria",
"Tarragona",
"Teruel",
"Toledo",
"Valencia",
"Valladolid",
"Vizcaya",
"Zamora",
"Zaragoza",
];
19 changes: 14 additions & 5 deletions front/src/app/embalse-provincia/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import Link from "next/link";
import { provincias } from "./array-provincias";

export default function EmbalsesProvinciaPage() {
return (
<div className="flex flex-col gap-8">
<h2>Embalse por provincias</h2>
<Link href="/embalse-provincia/malaga" className="link-accessible">
Málaga
</Link>
<div className="flex flex-col gap-8 rounded-2xl bg-(--color-base-100) p-4">
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS class syntax bg-(--color-base-100) is incorrect. Based on the pattern used in other components in this codebase (e.g., footer.component.tsx and header.component.tsx), this should be bg-base-100 instead. The current syntax will not apply the background color correctly.

Suggested change
<div className="flex flex-col gap-8 rounded-2xl bg-(--color-base-100) p-4">
<div className="flex flex-col gap-8 rounded-2xl bg-base-100 p-4">

Copilot uses AI. Check for mistakes.
<h2>Embalses por provincias</h2>
<div className="flex flex-col gap-4">
{provincias.map((provincia) => (
<Link
key={provincia}
href={`/embalse-provincia/${provincia}`}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The href uses provincia names directly without URL encoding. Province names contain special characters (accents like 'Á', 'Ó', 'É', spaces like 'Santa Cruz de Tenerife', 'La Coruña', etc.) which need to be properly URL-encoded. Consider using encodeURIComponent(provincia) in the href to ensure the URLs are correctly formed.

Suggested change
href={`/embalse-provincia/${provincia}`}
href={`/embalse-provincia/${encodeURIComponent(provincia)}`}

Copilot uses AI. Check for mistakes.
className="link-accessible"
>
{provincia}
</Link>
))}
</div>
</div>
);
}
Loading