From bc32275eb19805dec07ee5afca8a4aecacb34954 Mon Sep 17 00:00:00 2001 From: John SJ Anderson Date: Tue, 11 Jun 2024 17:46:47 -0700 Subject: [PATCH] Whitespace cleanup [#870] --- .../src/components/ListResources/ResourceGroup.tsx | 10 +++++----- static-site/src/components/ListResources/index.tsx | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/static-site/src/components/ListResources/ResourceGroup.tsx b/static-site/src/components/ListResources/ResourceGroup.tsx index 4c89d1010..b0a801af4 100644 --- a/static-site/src/components/ListResources/ResourceGroup.tsx +++ b/static-site/src/components/ListResources/ResourceGroup.tsx @@ -31,7 +31,7 @@ const ResourceGroupHeader = ({group, isMobile, setCollapsed, collapsible, isColl - + {group.groupUrl ? ( @@ -164,7 +164,7 @@ const ResourceGroupContainer = styled.div` `; const IndividualResourceContainer = styled.div<{$maxResourceWidth: number}>` - /* Columns are a simple CSS solution which works really well _if_ we can calculate the expected maximum + /* Columns are a simple CSS solution which works really well _if_ we can calculate the expected maximum resource width */ column-width: ${(props) => props.$maxResourceWidth}px; column-gap: 20px; @@ -239,7 +239,7 @@ function NextstrainLogo() { /** * Adds the `displayName` property to each resource. * Given successive nameParts: - * [ seasonal-flu, h1n1pdm] + * [ seasonal-flu, h1n1pdm] * [ seasonal-flu, h3n2] * We want to produce two names: a default name, which contains all parts, * and a displayName which hides the fields that match the preceding name. @@ -255,7 +255,7 @@ function _setDisplayName(resources: Resource[]) { name = r.nameParts.join(sep); } else { let matchIdx = r.nameParts.map((word, j) => word === resources[i-1]?.nameParts[j]).findIndex((v) => !v); - if (matchIdx===-1) { // -1 means every word is in the preceding name, but we should display the last word anyway + if (matchIdx===-1) { // -1 means every word is in the preceding name, but we should display the last word anyway matchIdx = r.nameParts.length-2; } name = r.nameParts.map((word, j) => j < matchIdx ? ' '.repeat(word.length) : word).join(sep); @@ -277,4 +277,4 @@ function collapseThresolds(numGroups: number) { resourcesToShowWhenCollapsed = 40; } return {collapseThreshold, resourcesToShowWhenCollapsed} -} \ No newline at end of file +} diff --git a/static-site/src/components/ListResources/index.tsx b/static-site/src/components/ListResources/index.tsx index 9617f198a..410cd8851 100644 --- a/static-site/src/components/ListResources/index.tsx +++ b/static-site/src/components/ListResources/index.tsx @@ -56,7 +56,7 @@ function ListResources({ if (dataFetchError) { return ( - + {"Whoops - listing resources isn't working!"}
{'Please '}get in touch{" if this keeps happening"} @@ -167,7 +167,7 @@ function SortOptions({sortMethod, changeSortMethod}) { } return ( - Sort pathogens by: + Sort pathogens by: