@@ -146,40 +146,48 @@ export default function FilterPanel({
146146 } }
147147 >
148148 { safeSchemas . map ( ( schema , index ) => {
149- return (
150- < div
151- key = { index }
152- className = { `d-flex justify-content-between align-items-center rounded-3 p-2 mt-2 ${ clicked === schema . id ? "bg-white" : "text-white" } cursor-pointer` }
153- style = { {
154- color :
155- clicked === schema . id
156- ? theme . primaryColors . primary700
157- : "white" ,
158- minHeight : "50px" ,
159- cursor : "pointer" ,
160- } }
161- onClick = { ( ) => {
162- setClicked ( schema . id ) ;
163- handleClick ( schema . id ) ;
164- } }
165- >
166- < Text
167- id = { schema . labelId }
168- className = "m-3"
149+ if ( schema . FilterComponent ) {
150+ return (
151+ < div
152+ key = { index }
153+ className = { `d-flex justify-content-between ms-4 align-items-center rounded-3 p-2 ${ clicked === schema . id ? "bg-white" : "text-white" } cursor-pointer` }
169154 style = { {
170- fontWeight : "500" ,
171- marginRight : "20px" ,
155+ color :
156+ clicked === schema . id
157+ ? theme . primaryColors . primary700
158+ : "white" ,
159+ minHeight : "50px" ,
160+ cursor : "pointer" ,
172161 } }
173- > </ Text >
174- < span >
175- { " " }
176- < i
177- className = "bi bi-chevron-right"
178- style = { { fontSize : "14px" } }
179- > </ i > { " " }
180- </ span >
181- </ div >
182- ) ;
162+ onClick = { ( ) => {
163+ setClicked ( schema . id ) ;
164+ handleClick ( schema . id ) ;
165+ } }
166+ >
167+ < Text
168+ id = { schema . labelId }
169+ className = "m-3"
170+ style = { {
171+ fontWeight : "500" ,
172+ marginRight : "20px" ,
173+ } }
174+ > </ Text >
175+ < span >
176+ { " " }
177+ < i
178+ className = "bi bi-chevron-right"
179+ style = { { fontSize : "14px" } }
180+ > </ i > { " " }
181+ </ span >
182+ </ div >
183+ ) ;
184+ } else {
185+ return (
186+ < div className = "mt-2 mb-2" key = { index } >
187+ { schema . id }
188+ </ div >
189+ ) ;
190+ }
183191 } ) }
184192 < div className = "mt-2 d-flex flex-wrap justify-content-center align-items-center w-100 gap-3" >
185193 < BrutalismButton
@@ -259,17 +267,25 @@ export default function FilterPanel({
259267 key = { index }
260268 ref = { schemaRefs . current [ index ] }
261269 >
262- < schema . FilterComponent
263- key = { schema . id }
264- labelId = { schema . labelId }
265- onChange = { handleFilterChange }
266- onClearFilter = { clearFilter }
267- { ...schema . filterComponentProps }
268- data = { data }
269- tempFormFilters = { tempFormFilters }
270- setFormFilters = { setFormFilters }
271- formFilters = { formFilters }
272- />
270+ { schema . FilterComponent ? (
271+ < schema . FilterComponent
272+ key = { schema . id }
273+ labelId = { schema . labelId }
274+ onChange = { handleFilterChange }
275+ onClearFilter = { clearFilter }
276+ { ...schema . filterComponentProps }
277+ data = { data }
278+ tempFormFilters = { tempFormFilters }
279+ setFormFilters = { setFormFilters }
280+ formFilters = { formFilters }
281+ />
282+ ) : (
283+ < div >
284+ < h2 >
285+ < FormattedMessage id = { schema . labelId } />
286+ </ h2 >
287+ </ div >
288+ ) }
273289 </ div >
274290 ) ;
275291 } ) }
0 commit comments