@@ -238,6 +238,13 @@ export default RequiresPermission(() => {
238238 return sorted . concat ( event ?. customQuestions ?? [ ] )
239239 } , [ event ] )
240240
241+ const sectionsInfo = ( sections , index ) => {
242+ return {
243+ sections : sections . length ,
244+ activeSection : index + 1 ,
245+ }
246+ }
247+
241248 const setNextStep = useCallback (
242249 ( nextStep , values , path ) => {
243250 const newFormData = path
@@ -337,10 +344,7 @@ export default RequiresPermission(() => {
337344 isActive = { activeStep === index }
338345 section = { section }
339346 data = { formData }
340- sectionsInfo = { {
341- sections : sections . length ,
342- activeSection : index + 1 ,
343- } }
347+ sectionsInfo = { sectionsInfo ( sections , index ) }
344348 onPrev = { setPrevStep }
345349 prevLabel = { prevStep ? prevStep . label : null }
346350 onNext = { ( values , path ) => {
@@ -352,10 +356,7 @@ export default RequiresPermission(() => {
352356 < RegistrationSection
353357 isActive = { activeStep === index }
354358 data = { formData }
355- sectionsInfo = { {
356- sections : sections . length ,
357- activeSection : index + 1 ,
358- } }
359+ sectionsInfo = { sectionsInfo ( sections , index ) }
359360 label = { section . label }
360361 fields = { section . fields }
361362 onPrev = { setPrevStep }
0 commit comments