Skip to content

Commit

Permalink
Other formatting improvements
Browse files Browse the repository at this point in the history
Apply formatting used elsewhere for consistency and readability.
  • Loading branch information
victorlin committed Nov 13, 2024
1 parent 7fd86e0 commit 13d17d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions static-site/src/components/ListResources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ export default ListResourcesResponsive

function SortOptions({sortMethod, changeSortMethod}: {
sortMethod: SortMethod,
changeSortMethod: React.Dispatch<React.SetStateAction<SortMethod>>
changeSortMethod: React.Dispatch<React.SetStateAction<SortMethod>>,
}) {
function onChangeValue(event:FormEvent<HTMLInputElement>): void {
function onChangeValue(event: FormEvent<HTMLInputElement>): void {
changeSortMethod(event.currentTarget.value as SortMethod);
}
return (
Expand Down
13 changes: 11 additions & 2 deletions static-site/src/components/ListResources/useDataFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export function useDataFetch(
* representing group names (pathogen names) and values which are arrays of
* resource objects.
*/
function partitionByPathogen(pathVersions: Record<string, string[]>, pathPrefix: string, versioned: boolean) {
function partitionByPathogen(
pathVersions: Record<string, string[]>,
pathPrefix: string,
versioned: boolean,
) {
return Object.entries(pathVersions).reduce((store: Record<string, Resource[]>, [name, dates]) => {
const sortedDates = [...dates].sort();

Expand Down Expand Up @@ -91,7 +95,12 @@ function partitionByPathogen(pathVersions: Record<string, string[]>, pathPrefix:
* Turn the provided partitions (an object mapping groupName to an array of resources)
* into an array of groups.
*/
function groupsFrom(partitions: Record<string, Resource[]>, pathPrefix: string, defaultGroupLinks: boolean, groupDisplayNames: Record<string, string>) {
function groupsFrom(
partitions: Record<string, Resource[]>,
pathPrefix: string,
defaultGroupLinks: boolean,
groupDisplayNames: Record<string, string>,
) {
return Object.entries(partitions).map(([groupName, resources]) => {
const groupInfo: Group = {
groupName: groupName,
Expand Down

0 comments on commit 13d17d9

Please sign in to comment.