-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactivities.py
32 lines (25 loc) · 1.05 KB
/
activities.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import streamlit as st
def activities_page():
st.header("Your Activities")
# Check if activities are in session state
if 'activities' not in st.session_state:
st.session_state['activities'] = []
# Display the activities
if st.session_state['activities']:
st.write("## Your Scheduled Sessions")
activities_list = st.session_state['activities']
# Separate activities by role
mentor_activities = [activity for activity in activities_list if activity['role'] == 'Mentor']
mentee_activities = [activity for activity in activities_list if activity['role'] == 'Mentee']
# Display tables
if mentor_activities:
st.write("### Mentorships You Are Offering")
st.table(mentor_activities)
if mentee_activities:
st.write("### Mentorships You Are Seeking")
st.table(mentee_activities)
else:
st.write("No activities scheduled yet.")
st.write("## Refresh to Check for Updates")
if st.button("Refresh"):
st.rerun()