Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -294,9 +294,9 @@ def display_pet_details(pet_id):
|
|
294 |
|
295 |
# Back button
|
296 |
if st.button("← Back to Search Results"):
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
|
301 |
# Pet name and status
|
302 |
st.markdown(f"<h1 class='main-header'>{pet['name']}</h1>", unsafe_allow_html=True)
|
|
|
294 |
|
295 |
# Back button
|
296 |
if st.button("← Back to Search Results"):
|
297 |
+
if st.session_state.selected_pet is not None:
|
298 |
+
st.session_state.selected_pet = None
|
299 |
+
st.experimental_rerun() # Force immediate rerun
|
300 |
|
301 |
# Pet name and status
|
302 |
st.markdown(f"<h1 class='main-header'>{pet['name']}</h1>", unsafe_allow_html=True)
|