diff --git a/src/helpers/partnersReducer.ts b/src/helpers/partnersReducer.ts index ad6d583f..cd873077 100644 --- a/src/helpers/partnersReducer.ts +++ b/src/helpers/partnersReducer.ts @@ -31,7 +31,6 @@ export enum partnersActions { 'TOGGLE_VALIDATORS', 'TOGGLE_ON_MESSENGER', 'UPDATE_BUSINESS_FIELDS_FROM_API', - } export interface ActionType { @@ -88,9 +87,10 @@ export const partnersReducer = ( case partnersActions.TOGGLE_CATEGORY: const updatedBusinessField = state.businessField.map(group => { if (group.category === action.payload) { + const isAllSelected = group.fields.every(field => field.active) const updatedFields = group.fields.map(field => ({ ...field, - active: !field.active, + active: isAllSelected ? false : true, // Toggle between all selected and all deselected })) return { ...group, fields: updatedFields } } diff --git a/src/redux/services/partners.ts b/src/redux/services/partners.ts index 602cbc9c..83dee9c5 100644 --- a/src/redux/services/partners.ts +++ b/src/redux/services/partners.ts @@ -179,7 +179,7 @@ function getServiceName(fullName: unknown): string { const getBaseUrl = () => { const currentPath = typeof window !== 'undefined' ? window.location.hostname : '' if (currentPath === 'localhost' || currentPath.includes('dev')) { - return BASE_URLS.prod + return BASE_URLS.dev } else if (currentPath) { return BASE_URLS.prod } else {