Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -597,6 +597,15 @@ def main():
|
|
597 |
except Exception as e:
|
598 |
st.error(f"Error acquiring access token: {str(e)}")
|
599 |
st.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
else:
|
601 |
access_token = st.session_state['access_token']
|
602 |
|
|
|
597 |
except Exception as e:
|
598 |
st.error(f"Error acquiring access token: {str(e)}")
|
599 |
st.stop()
|
600 |
+
|
601 |
+
fragment = query_params.get('code', [None])[0] # For example, 'add-event'
|
602 |
+
# Handle section jumping based on the URL fragment
|
603 |
+
if fragment:
|
604 |
+
st.write(f"Detected URL fragment: {fragment}")
|
605 |
+
# Simulate the scrolling or jump based on fragment
|
606 |
+
if fragment == 'add-event':
|
607 |
+
st.markdown("<script>document.getElementById('add-event').scrollIntoView();</script>", unsafe_allow_html=True)
|
608 |
+
|
609 |
else:
|
610 |
access_token = st.session_state['access_token']
|
611 |
|