From 17eba50db2e23acfc565947b6130e63b635e9a59 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Wed, 24 Jan 2024 16:47:23 -0500 Subject: [PATCH] fix: update functional argument names --- who-metrics-ui/src/components/RepositoriesTable.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/who-metrics-ui/src/components/RepositoriesTable.tsx b/who-metrics-ui/src/components/RepositoriesTable.tsx index a2a6ac7..dfdfc89 100644 --- a/who-metrics-ui/src/components/RepositoriesTable.tsx +++ b/who-metrics-ui/src/components/RepositoriesTable.tsx @@ -56,13 +56,13 @@ type SelectOption = { // This selects a field to populate a dropdown with const dropdownOptions = (field: keyof Repo, filter = ''): SelectOption[] => - Array.from(new Set(repos.map((r) => r[field]))) - .map((d) => ({ - label: d, - value: d, + Array.from(new Set(repos.map((repo) => repo[field]))) + .map((fieldName) => ({ + label: fieldName, + value: fieldName, })) - .filter((d) => - (d.value as string).toLowerCase().includes(filter.toLowerCase()), + .filter((fieldName) => + (fieldName.value as string).toLowerCase().includes(filter.toLowerCase()), ); // Helper function to get the selected option value from a filter and field