apartment_games / app.py
gkdivya's picture
Update app.py
b0011f1
import streamlit as st
from state_management import initialize_state
from player_availability import player_availability_screen
from match_organizer import schedule_matches_screen
from settings import settings_screen
from match_status import update_match_status_screen
def app():
st.title("Apartment Games")
# This line initializes the session state variables
initialize_state()
# Define the menu options
menu = ["Player Availability Status", "Match Status", "Match Organizer", "Settings"]
# Set a default value for the selection box
default_index = menu.index("Player Availability Status") # This gets the index of the default page
# Here we set the default value using the index
choice = st.sidebar.selectbox("Choose an option:", menu, index=default_index)
if choice == "Player Availability Status":
player_availability_screen()
elif choice == "Match Status":
update_match_status_screen()
elif choice == "Match Organizer":
schedule_matches_screen()
elif choice == "Settings":
settings_screen()
if __name__ == "__main__":
app()