From 7284d42bb9c04d363c976a1883d54f8cce892bbf Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Mon, 9 Oct 2023 14:06:13 -0400 Subject: [PATCH] feat: alphabetize sources --- client/src/components/Browse/Sources/BrowseSources.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/Browse/Sources/BrowseSources.tsx b/client/src/components/Browse/Sources/BrowseSources.tsx index 277727e9..8ed2a9f6 100644 --- a/client/src/components/Browse/Sources/BrowseSources.tsx +++ b/client/src/components/Browse/Sources/BrowseSources.tsx @@ -27,10 +27,10 @@ export const BrowseSources = () => { 'POTENTIALLY_DRUGGABLE' ); - let geneSources = geneData?.sources?.nodes; - let drugSources = drugData?.sources?.nodes; - let interactionSources = interactionData?.sources?.nodes; - let potentiallyDruggableSources = potentiallyDruggableData?.sources?.nodes; + let geneSources = geneData?.sources?.nodes?.sort((a: { sourceDbName: string; }, b: { sourceDbName: any; }) => a.sourceDbName.localeCompare(b.sourceDbName)); + let drugSources = drugData?.sources?.nodes?.sort((a: { sourceDbName: string; }, b: { sourceDbName: any; }) => a.sourceDbName.localeCompare(b.sourceDbName)); + let interactionSources = interactionData?.sources?.nodes?.sort((a: { sourceDbName: string; }, b: { sourceDbName: any; }) => a.sourceDbName.localeCompare(b.sourceDbName)); + let potentiallyDruggableSources = potentiallyDruggableData?.sources?.nodes?.sort((a: { sourceDbName: string; }, b: { sourceDbName: any; }) => a.sourceDbName.localeCompare(b.sourceDbName)); const sectionsMap = [ {