James McCool commited on
Commit
b44c615
·
1 Parent(s): 2b816c4

Update column layout in app.py to adjust button spacing and enhance visual clarity. Add conditional display for saved lineups, improving user feedback when no lineups are available. This update streamlines the user experience by providing clearer information on lineup status.

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1392,7 +1392,7 @@ with tab4:
1392
  )
1393
 
1394
  # Optionally, add a button to clear the lineup
1395
- clear_col, save_col, export_col, blank_col = st.columns([2, 2, 2, 10])
1396
  with clear_col:
1397
  if st.button("Clear Lineup", key='clear_lineup'):
1398
  st.session_state['handbuilder_lineup'] = pd.DataFrame(columns=['Player', 'Position', 'Team', 'Team_Total', 'Opp_Total', 'Salary', 'Median', '2x%', 'Own%', 'Slot', 'Order'])
@@ -1417,4 +1417,9 @@ with tab4:
1417
  mime='text/csv',
1418
  )
1419
  else:
1420
- st.write("No saved lineups to export")
 
 
 
 
 
 
1392
  )
1393
 
1394
  # Optionally, add a button to clear the lineup
1395
+ clear_col, save_col, export_col, blank_col = st.columns([2, 2, 2, 12])
1396
  with clear_col:
1397
  if st.button("Clear Lineup", key='clear_lineup'):
1398
  st.session_state['handbuilder_lineup'] = pd.DataFrame(columns=['Player', 'Position', 'Team', 'Team_Total', 'Opp_Total', 'Salary', 'Median', '2x%', 'Own%', 'Slot', 'Order'])
 
1417
  mime='text/csv',
1418
  )
1419
  else:
1420
+ st.write("No saved lineups to export")
1421
+
1422
+ if 'saved_lineups' in st.session_state:
1423
+ st.table(pd.DataFrame(st.session_state['saved_lineups'], columns=dk_hb_columns if site_var == 'Draftkings' else fd_hb_columns))
1424
+ else:
1425
+ st.write("No saved lineups")