Skip to content

Commit

Permalink
🔨 hard code link redirects from country templates to selector
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Nov 7, 2023
1 parent 3248533 commit e69b9bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions site/DataPageV2Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,17 @@ export const DataPageV2Content = ({
return shared.length > 0
})
: relatedResearchCandidates
for (const item of relatedResearch) {
// TODO: these are workarounds to not link to the (not really existing) template pages for energy or co2
// country profiles but instead to the topic page at the country selector.
if (item.url === "/co2-country-profile")
item.url =
"/co2-and-greenhouse-gas-emissions#co2-and-greenhouse-gas-emissions-country-profiles"
else if (item.url === "/energy-country-profile")
item.url = "/energy#country-profiles"
else if (item.url === "/coronavirus-country-profile")
item.url = "/coronavirus#coronavirus-country-profiles"
}
// TODO: mark topic pages

return (
Expand Down

0 comments on commit e69b9bc

Please sign in to comment.