Skip to content

Commit

Permalink
Merge pull request #996: Auto-prepend / to tile URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin authored Aug 26, 2024
2 parents b0688b0 + 577a343 commit bba2a61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion static-site/content/featured-analyses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# rendered on the splash page.
# - When adding or modifying descriptions, ensure it takes up at most two lines
# when rendered on the splash page.
# - Ensure URLs start with `/`.

- name: Mpox in the DRC
description: INRB analysis of ongoing mpox clade I outbreak in the DRC
Expand Down
4 changes: 4 additions & 0 deletions static-site/src/components/splash/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ function TileSourceIcon({ url, isNarrative }: {

let maintainers: string, image: React.JSX.Element;

if (!url.startsWith('/')) {
url = '/' + url;
}

if (url.startsWith('/community')) {
const owner = isNarrative ? url.split('/')[3] : url.split('/')[2];
maintainers = `${owner} on GitHub`;
Expand Down

0 comments on commit bba2a61

Please sign in to comment.