Update app.py
Browse files
app.py
CHANGED
@@ -1214,11 +1214,14 @@ def show_theme_selection():
|
|
1214 |
cols = st.columns(4)
|
1215 |
|
1216 |
# แสดงธีมในแต่ละ column
|
1217 |
-
for
|
1218 |
with col:
|
|
|
|
|
|
|
1219 |
if st.button(
|
1220 |
f"{theme['icon']} {theme['name_th']}",
|
1221 |
-
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']
|