@@ -146,11 +146,14 @@ export default RequiresPermission(() => {
146146 finishRegistration,
147147 } = useContext ( EventDetailContext )
148148 const userProfile = useSelector ( UserSelectors . userProfile )
149-
150149 const [ loading , setLoading ] = useState ( false )
151150 const [ formData , setFormData ] = useState ( { } )
152151 const [ activeStep , setActiveStep ] = useState ( 0 )
153152 const [ eventNewsLetterHidden , setEventNewsLetterHidden ] = useState ( true )
153+
154+ const globalNavbarElement = document . getElementById ( 'global-navbar' )
155+ globalNavbarElement . style . display = 'none'
156+
154157 useEffect ( ( ) => {
155158 setTimeout ( function ( ) {
156159 window . scrollTo ( { top : 0 , left : 0 , behavior : 'smooth' } )
@@ -235,6 +238,13 @@ export default RequiresPermission(() => {
235238 return sorted . concat ( event ?. customQuestions ?? [ ] )
236239 } , [ event ] )
237240
241+ const sectionsInfo = ( sections , index ) => {
242+ return {
243+ sections : sections . length ,
244+ activeSection : index + 1 ,
245+ }
246+ }
247+
238248 const setNextStep = useCallback (
239249 ( nextStep , values , path ) => {
240250 const newFormData = path
@@ -287,7 +297,9 @@ export default RequiresPermission(() => {
287297 }
288298 AnalyticsService . events . COMPLETE_REGISTRATION ( slug )
289299 setActiveStep ( sections . length + 1 )
300+ globalNavbarElement . style . display = 'block'
290301 } catch ( e ) {
302+ globalNavbarElement . style . display = 'none'
291303 dispatch (
292304 SnackbarActions . error (
293305 'Oops, something went wrong... Please try again' ,
@@ -332,10 +344,7 @@ export default RequiresPermission(() => {
332344 isActive = { activeStep === index }
333345 section = { section }
334346 data = { formData }
335- sectionsInfo = { {
336- sections : sections . length ,
337- activeSection : index + 1 ,
338- } }
347+ sectionsInfo = { sectionsInfo ( sections , index ) }
339348 onPrev = { setPrevStep }
340349 prevLabel = { prevStep ? prevStep . label : null }
341350 onNext = { ( values , path ) => {
@@ -347,10 +356,7 @@ export default RequiresPermission(() => {
347356 < RegistrationSection
348357 isActive = { activeStep === index }
349358 data = { formData }
350- sectionsInfo = { {
351- sections : sections . length ,
352- activeSection : index + 1 ,
353- } }
359+ sectionsInfo = { sectionsInfo ( sections , index ) }
354360 label = { section . label }
355361 fields = { section . fields }
356362 onPrev = { setPrevStep }
0 commit comments