nagasurendra commited on
Commit
283189f
·
verified ·
1 Parent(s): 769584b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -439,9 +439,20 @@ def app():
439
  lambda: (gr.update(visible=True), gr.update(visible=False)),
440
  outputs=[login_section, signup_section],
441
  )
442
- # Navigate to Cart Page
443
  view_cart_button.click(
 
 
 
 
 
444
  lambda: (gr.update(visible=False), gr.update(visible=True)),
 
 
 
 
 
 
 
445
  outputs=[menu_section, cart_section],
446
  )
447
  # Navigate Back to Menu Page
 
439
  lambda: (gr.update(visible=True), gr.update(visible=False)),
440
  outputs=[login_section, signup_section],
441
  )
 
442
  view_cart_button.click(
443
+ fn=None, # No Python function needed
444
+ inputs=None,
445
+ outputs=None,
446
+ _js=scroll_to_top_js, # JavaScript for scrolling to the top
447
+ ).then(
448
  lambda: (gr.update(visible=False), gr.update(visible=True)),
449
+ inputs=None,
450
+ outputs=[menu_section, cart_section],
451
+ )
452
+
453
+ back_to_menu_button.click(
454
+ lambda: (gr.update(visible=True), gr.update(visible=False)),
455
+ inputs=None,
456
  outputs=[menu_section, cart_section],
457
  )
458
  # Navigate Back to Menu Page