From 71b4ecc7fb50ae801acc1b4e78111a995586c13a Mon Sep 17 00:00:00 2001 From: Muslimjon <59481011+mkholjuraev@users.noreply.github.com> Date: Tue, 7 May 2024 18:32:10 +0200 Subject: [PATCH] fix(filterChange): replace initial null values with empty array to fix mobile ui (#2193) Co-authored-by: Adonis Puente <60629070+adonispuente@users.noreply.github.com> --- src/components/filters/useRhcdFilter.js | 2 +- src/components/filters/useUpdateMethodFilter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/filters/useRhcdFilter.js b/src/components/filters/useRhcdFilter.js index 82b3caa86..17c363ce5 100644 --- a/src/components/filters/useRhcdFilter.js +++ b/src/components/filters/useRhcdFilter.js @@ -1,7 +1,7 @@ import { useState } from 'react'; import { RHCD_FILTER_KEY, rhcdOptions } from '../../Utilities/index'; -export const rhcdFilterState = { rhcdFilter: null }; +export const rhcdFilterState = { rhcdFilter: [] }; export const RHCD_FILTER = 'RHCD_FILTER'; export const rhcdFilterReducer = (_state, { type, payload }) => ({ ...(type === RHCD_FILTER && { diff --git a/src/components/filters/useUpdateMethodFilter.js b/src/components/filters/useUpdateMethodFilter.js index ed84fc14f..655eeb674 100644 --- a/src/components/filters/useUpdateMethodFilter.js +++ b/src/components/filters/useUpdateMethodFilter.js @@ -5,7 +5,7 @@ import { } from '../../Utilities/index'; import useFeatureFlag from '../../Utilities/useFeatureFlag'; -export const updateMethodFilterState = { updateMethodFilter: null }; +export const updateMethodFilterState = { updateMethodFilter: [] }; export const UPDATE_METHOD_FILTER = 'UPDATE_METHOD_FILTER'; export const updateMethodFilterReducer = (_state, { type, payload }) => ({ ...(type === UPDATE_METHOD_FILTER && {