Skip to content

Commit

Permalink
refactor(related articles): use url instead of slug
Browse files Browse the repository at this point in the history
  • Loading branch information
mlbrgl committed Feb 18, 2024
1 parent d8e616a commit 1b7afea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion adminSiteServer/apiRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
SuggestedChartRevisionStatus,
variableAnnotationAllowedColumnNamesAndTypes,
VariableAnnotationsResponseRow,
isUndefined,
OwidVariableWithSource,
OwidChartDimensionInterface,
DimensionProperty,
Expand Down
5 changes: 1 addition & 4 deletions site/RelatedArticles/RelatedArticles.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react"
import { PostReference } from "@ourworldindata/utils"
import { BAKED_BASE_URL } from "../../settings/serverSettings.js"

export const RelatedArticles = ({
articles,
Expand All @@ -11,9 +10,7 @@ export const RelatedArticles = ({
<ul className="research">
{articles.map((article) => (
<li key={article.slug}>
<a href={`${BAKED_BASE_URL}/${article.slug}`}>
{article.title}
</a>
<a href={article.url}>{article.title}</a>
</li>
))}
</ul>
Expand Down

0 comments on commit 1b7afea

Please sign in to comment.