From 13d17d9ca0567cc3492722bc1e26d3168fe52721 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:29:11 -0800 Subject: [PATCH] Other formatting improvements Apply formatting used elsewhere for consistency and readability. --- static-site/src/components/ListResources/index.tsx | 4 ++-- .../src/components/ListResources/useDataFetch.ts | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/static-site/src/components/ListResources/index.tsx b/static-site/src/components/ListResources/index.tsx index b8a6a6c1a..da3e0f86a 100644 --- a/static-site/src/components/ListResources/index.tsx +++ b/static-site/src/components/ListResources/index.tsx @@ -176,9 +176,9 @@ export default ListResourcesResponsive function SortOptions({sortMethod, changeSortMethod}: { sortMethod: SortMethod, - changeSortMethod: React.Dispatch> + changeSortMethod: React.Dispatch>, }) { - function onChangeValue(event:FormEvent): void { + function onChangeValue(event: FormEvent): void { changeSortMethod(event.currentTarget.value as SortMethod); } return ( diff --git a/static-site/src/components/ListResources/useDataFetch.ts b/static-site/src/components/ListResources/useDataFetch.ts index d8c0e7bb2..270f7c81e 100644 --- a/static-site/src/components/ListResources/useDataFetch.ts +++ b/static-site/src/components/ListResources/useDataFetch.ts @@ -56,7 +56,11 @@ export function useDataFetch( * representing group names (pathogen names) and values which are arrays of * resource objects. */ -function partitionByPathogen(pathVersions: Record, pathPrefix: string, versioned: boolean) { +function partitionByPathogen( + pathVersions: Record, + pathPrefix: string, + versioned: boolean, +) { return Object.entries(pathVersions).reduce((store: Record, [name, dates]) => { const sortedDates = [...dates].sort(); @@ -91,7 +95,12 @@ function partitionByPathogen(pathVersions: Record, pathPrefix: * Turn the provided partitions (an object mapping groupName to an array of resources) * into an array of groups. */ -function groupsFrom(partitions: Record, pathPrefix: string, defaultGroupLinks: boolean, groupDisplayNames: Record) { +function groupsFrom( + partitions: Record, + pathPrefix: string, + defaultGroupLinks: boolean, + groupDisplayNames: Record, +) { return Object.entries(partitions).map(([groupName, resources]) => { const groupInfo: Group = { groupName: groupName,