Benjamin Bossan commited on
Commit
ec0feb6
1 Parent(s): 273184e

Add another back button on instructions page

Browse files
Files changed (1) hide show
  1. gethelp.py +4 -3
gethelp.py CHANGED
@@ -1,12 +1,12 @@
1
  import streamlit as st
2
 
3
 
4
- def add_back_button():
5
  def fn():
6
  st.session_state.screen.state = "start"
7
 
8
  st.button(
9
- "Back", help="Get back to the start screen", on_click=fn, key="help_get_back"
10
  )
11
 
12
 
@@ -326,5 +326,6 @@ def add_help_content():
326
 
327
 
328
  def help_page():
329
- add_back_button()
330
  add_help_content()
 
 
1
  import streamlit as st
2
 
3
 
4
+ def add_back_button(key):
5
  def fn():
6
  st.session_state.screen.state = "start"
7
 
8
  st.button(
9
+ "Back", help="Get back to the start screen", on_click=fn, key=key
10
  )
11
 
12
 
 
326
 
327
 
328
  def help_page():
329
+ add_back_button(key="help_get_back")
330
  add_help_content()
331
+ add_back_button(key="help_get_back2") # names must be unique