-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestpage.py
More file actions
45 lines (34 loc) · 1.58 KB
/
Copy pathtestpage.py
File metadata and controls
45 lines (34 loc) · 1.58 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
import streamlit as sl
from modules import display_my_custom_component, display_post, display_genai_advice, display_activity_summary, display_recent_workouts
from data_fetcher import get_user_posts, get_genai_advice, get_user_profile, get_user_sensor_data, get_user_workouts
from streamlit_option_menu import option_menu
from activity_page import display
from community_page import display_community
def display_app_page():
"""Displays the home page of the app."""
userId = 'user1'
user_profile = get_user_profile(userId)
user_name = user_profile['username']
selected = option_menu(
menu_title=None, # Appears at top of sidebar
options=["Home", "Activities", "Community"],
icons=["house", "bar-chart", "heart"], # Choose icons from https://icons.getbootstrap.com/
default_index=0,
menu_icon="cast",
orientation="horizontal",
)
if selected == "Home":
sl.title("🏠 Home Page")
sl.subheader(f"Welcome {user_profile['full_name']} to MyFitness!")
# Profile Card
sl.image(user_profile['profile_image'], width=150, caption="Your Profile Picture")
sl.markdown(f"**Username:** {user_profile['username']}")
sl.markdown(f"**Date of Birth:** {user_profile['date_of_birth']}")
# Friends section
sl.markdown("### 👯 Your Friends")
if user_profile['friends']:
for friend_id in user_profile['friends']:
sl.markdown(f"- {friend_id}")
else:
sl.info("You don't have any friends yet!")
display_genai_advice(userId)