From 9ceee868b666299afb1bd168b075e5b30dc42848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Boixader=20G=C3=BCell?= Date: Mon, 22 Apr 2024 08:08:39 +0200 Subject: [PATCH] refactor: parseSearchQueryParamFunction name --- src/guillo-gmi/hooks/useRegistry.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guillo-gmi/hooks/useRegistry.tsx b/src/guillo-gmi/hooks/useRegistry.tsx index 158932c..0a0525e 100644 --- a/src/guillo-gmi/hooks/useRegistry.tsx +++ b/src/guillo-gmi/hooks/useRegistry.tsx @@ -81,7 +81,7 @@ export interface IRegistry { fieldsToFilter: { [key: string]: string[] } - parsedSearchQueryParam: { + parseSearchQueryParamFunction: { [key: string]: (query: string, type: string) => string } defaultSortValue: { @@ -147,7 +147,7 @@ const registry: IRegistry = { fieldsToFilter: { UserManager: ['id', 'email', 'user_name'], }, - parsedSearchQueryParam: {}, + parseSearchQueryParamFunction: {}, defaultSortValue: {}, } @@ -251,7 +251,7 @@ const getSearchEngineQueryParamsFunction = (type: string) => { } const getParsedSearchQueryParam = (query: string, type: string) => { - const parsedFunction = registry.parsedSearchQueryParam[type] + const parsedFunction = registry.parseSearchQueryParamFunction[type] if (!parsedFunction) { const fieldsToFilter = getFieldsToFilter(type) return buildQs(parser(query, fieldsToFilter))