James McCool commited on
Commit
daa425d
·
1 Parent(s): 9c82393

Update pagination button labels for clarity in app.py

Browse files

- Changed button labels to "Previous Page" and "Next Page" for improved user understanding during navigation.
- Maintained session state management by ensuring relevant data is cleared upon page transitions, consistent with previous enhancements.

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -195,7 +195,7 @@ with tab2:
195
  # Create pagination controls in a single row
196
  pagination_cols = st.columns([4, 1, 1, 1, 4])
197
  with pagination_cols[1]:
198
- if st.button(f"Page {st.session_state.current_page - 1}"):
199
  if st.session_state['current_page'] > 1:
200
  st.session_state.current_page -= 1
201
  else:
@@ -205,7 +205,7 @@ with tab2:
205
  del st.session_state['stack_frame']
206
 
207
  with pagination_cols[3]:
208
- if st.button(f"Page {st.session_state.current_page + 1}"):
209
  st.session_state.current_page += 1
210
  if 'player_frame' in st.session_state:
211
  del st.session_state['player_frame']
 
195
  # Create pagination controls in a single row
196
  pagination_cols = st.columns([4, 1, 1, 1, 4])
197
  with pagination_cols[1]:
198
+ if st.button(f"Previous Page"):
199
  if st.session_state['current_page'] > 1:
200
  st.session_state.current_page -= 1
201
  else:
 
205
  del st.session_state['stack_frame']
206
 
207
  with pagination_cols[3]:
208
+ if st.button(f"Next Page"):
209
  st.session_state.current_page += 1
210
  if 'player_frame' in st.session_state:
211
  del st.session_state['player_frame']