diff --git a/src/app/prosperity-dashboard/CombinedSectionChart.tsx b/src/app/prosperity-dashboard/CombinedSectionChart.tsx index 7a1e22e..4967d8a 100644 --- a/src/app/prosperity-dashboard/CombinedSectionChart.tsx +++ b/src/app/prosperity-dashboard/CombinedSectionChart.tsx @@ -12,6 +12,7 @@ import { } from "@buildcanada/charts"; import { humanizeSourceName, + humanizeSourceUrl, type EconomySeriesResponse, } from "@/lib/api/economy"; import { @@ -95,7 +96,7 @@ function buildGrapherState( { id: 1, title: humanizeSourceName(source.name), - urlMain: source.url ?? undefined, + urlMain: humanizeSourceUrl(source.name, source.url) ?? undefined, datePublished: source.last_fetched_at ?? undefined, }, ] diff --git a/src/app/prosperity-dashboard/IndicatorChart.tsx b/src/app/prosperity-dashboard/IndicatorChart.tsx index ba15871..c491fb7 100644 --- a/src/app/prosperity-dashboard/IndicatorChart.tsx +++ b/src/app/prosperity-dashboard/IndicatorChart.tsx @@ -12,6 +12,7 @@ import { } from "@buildcanada/charts"; import { humanizeSourceName, + humanizeSourceUrl, type EconomySeriesResponse, } from "@/lib/api/economy"; import { @@ -99,7 +100,7 @@ function buildGrapherState( { id: 1, title: humanizeSourceName(source.name), - urlMain: source.url ?? undefined, + urlMain: humanizeSourceUrl(source.name, source.url) ?? undefined, datePublished: source.last_fetched_at ?? undefined, }, ] diff --git a/src/app/prosperity-dashboard/[section]/page.tsx b/src/app/prosperity-dashboard/[section]/page.tsx index 53c64be..11295e2 100644 --- a/src/app/prosperity-dashboard/[section]/page.tsx +++ b/src/app/prosperity-dashboard/[section]/page.tsx @@ -7,6 +7,7 @@ import { getSiteConfig } from "@/lib/api"; import { getEconomicSeries, humanizeSourceName, + humanizeSourceUrl, type EconomySeriesResponse, } from "@/lib/api/economy"; import { PageHeader } from "@/components/ui/page-header"; @@ -63,12 +64,13 @@ function SourceLine({ response }: { response: EconomySeriesResponse }) { ? formatFetchedDate(source.last_fetched_at) : ""; const sourceName = humanizeSourceName(source.name); + const sourceUrl = humanizeSourceUrl(source.name, source.url); return (