Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion front/src/app/embalse/[embalse]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
mapEmbalseToReservoirData,
mapHistoricalReservoirToViewModel,
} from "@/pods/embalse/embalse.mapper";
import { formatEmbalseDisplayName } from "@/pods/embalse/embalse-name.helper";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

export const revalidate = 300; // ISR: regenerar cada 5 minutos

Expand Down
4 changes: 2 additions & 2 deletions front/src/pods/embalse-cuenca/embalse-cuenca.component.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import { Card } from "@/common/components/card.component";
import { Lookup } from "@/common/models";
import { generateSlug } from "db-model";
import Link from "next/link";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

export interface Props {
nombreCuenca: string;
Expand All @@ -26,7 +26,7 @@ export const EmbalseCuencaComponent: React.FC<Props> = (props) => {
href={`/embalse/${generateSlug(name)}`}
className="link-accessible"
>
{name}
{formatEmbalseDisplayName(name)}
</Link>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Card } from "@/common/components/card.component";
import { Lookup } from "@/common/models";
import Link from "next/link";
import React from "react";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

interface Props {
nombreProvincia: string;
Expand All @@ -21,7 +22,7 @@ export const EmbalseProvincia: React.FC<Props> = (props) => {
<div className="grid grid-cols-1 gap-4 p-6 sm:grid-cols-2 md:grid-cols-3">
{embalses.map(({ id, name }) => (
<Link key={id} href={`/embalse/${id}`} className="link-accessible">
{name}
{formatEmbalseDisplayName(name)}
</Link>
))}
</div>
Expand Down
3 changes: 2 additions & 1 deletion front/src/pods/embalse-search/components/filtered-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { useCombobox } from "downshift";
import { EmbalseSearchModel } from "../embalse-search.vm";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

interface Props {
isOpen: boolean;
Expand Down Expand Up @@ -35,7 +36,7 @@ export const FilteredList: React.FC<Props> = (props) => {
highlightedIndex === index ? "bg-primary text-white" : ""
}`}
>
{item.name}
{formatEmbalseDisplayName(item.name)}
</li>
))}
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from "next/link";
import { EmbalseSearchModel } from "../../embalse-search.vm";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

interface Props {
searches: EmbalseSearchModel[];
Expand All @@ -14,7 +15,9 @@ export const RecentSearches: React.FC<Props> = (props) => {
<ul>
{searches.map((item) => (
<li key={item.slug} className="mt-3">
<Link className="link-accessible" href={`/embalse/${item.slug}`}>{item.name} </Link>
<Link className="link-accessible" href={`/embalse/${item.slug}`}>
{formatEmbalseDisplayName(item.name)}
</Link>
</li>
))}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion front/src/pods/embalse/components/reservoir-card-gauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GaugeChart } from "./reservoir-gauge";
import { GaugeLegend } from "./reservoir-gauge/gauge-chart/components/gauge-legend.component";
import { HistoryChart } from "./chart";
import { useIsMobile } from "./useIsMobile";
import { formatEmbalseDisplayName } from "../embalse-name.helper";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";
interface Props {
name: string;
reservoirData: ReservoirData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReservoirInfo } from "../embalse.vm";
import React from "react";
import Image from "next/image";
import { formatEmbalseDisplayName } from "@/common/helpers/embalse-name.helper";

interface Props {
reservoirInfo: ReservoirInfo;
Expand All @@ -14,7 +14,9 @@ export const ReservoirCardInfo: React.FC<Props> = (props) => {
className="flex w-full flex-col items-start gap-4"
aria-labelledby="discover-title"
>
<h2 id="discover-title">Descubre el embalse {reservoirInfo?.name}</h2>
<h2 id="discover-title">
Descubre el embalse {formatEmbalseDisplayName(reservoirInfo?.name)}
</h2>
<p>{reservoirInfo?.description}</p>
{reservoirInfo?.mainPicture?.url && (
<>
Expand Down
Loading