Skip to content

Commit

Permalink
Whitespace cleanup [#870]
Browse files Browse the repository at this point in the history
  • Loading branch information
genehack committed Jun 12, 2024
1 parent d2b91ed commit bc32275
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions static-site/src/components/ListResources/ResourceGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ResourceGroupHeader = ({group, isMobile, setCollapsed, collapsible, isColl
<NextstrainLogo/>

<FlexColumnContainer>

<HeaderRow>
{group.groupUrl ? (
<TooltipWrapper description={`Click to load the default (and most recent) analysis for ${group.groupDisplayName || group.groupName}`}>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand All @@ -277,4 +277,4 @@ function collapseThresolds(numGroups: number) {
resourcesToShowWhenCollapsed = 40;
}
return {collapseThreshold, resourcesToShowWhenCollapsed}
}
}
6 changes: 3 additions & 3 deletions static-site/src/components/ListResources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function ListResources({

if (dataFetchError) {
return (
<ErrorContainer>
<ErrorContainer>
{"Whoops - listing resources isn't working!"}
<br/>
{'Please '}<a href="/contact" style={{fontWeight: 300}}>get in touch</a>{" if this keeps happening"}
Expand Down Expand Up @@ -167,7 +167,7 @@ function SortOptions({sortMethod, changeSortMethod}) {
}
return (
<SortContainer>
Sort pathogens by:
Sort pathogens by:
<input id="alphabetical" type="radio" onChange={onChangeValue} value="alphabetical"
checked={"alphabetical"===sortMethod} style={{cursor: "alphabetical"===sortMethod ? 'default' : 'pointer'}}/>
<TooltipWrapper description={'Pathogen groups ordered alphabetically. ' +
Expand Down Expand Up @@ -237,4 +237,4 @@ const SortContainer = styled.div`
margin-left: 20px;
margin-right: 5px;
}
`
`

0 comments on commit bc32275

Please sign in to comment.