Rathapoom commited on
Commit
7882b36
·
verified ·
1 Parent(s): 499d5c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1214,11 +1214,14 @@ def show_theme_selection():
1214
  cols = st.columns(4)
1215
 
1216
  # แสดงธีมในแต่ละ column
1217
- for idx, (col, theme) in enumerate(zip(cols, available_themes)):
1218
  with col:
 
 
 
1219
  if st.button(
1220
  f"{theme['icon']} {theme['name_th']}",
1221
- key=f"theme_select_{idx}", # ใช้ index เป็น key
1222
  use_container_width=True
1223
  ):
1224
  st.session_state.current_theme = theme['id']
 
1214
  cols = st.columns(4)
1215
 
1216
  # แสดงธีมในแต่ละ column
1217
+ for col, theme in zip(cols, available_themes):
1218
  with col:
1219
+ # ใช้ ID ของธีมเป็น key
1220
+ button_key = f"select_theme_{theme['id']}"
1221
+
1222
  if st.button(
1223
  f"{theme['icon']} {theme['name_th']}",
1224
+ key=button_key,
1225
  use_container_width=True
1226
  ):
1227
  st.session_state.current_theme = theme['id']