diff --git a/ui-poc/Home.py b/ui-poc/Home.py index af021a05..30118ec2 100644 --- a/ui-poc/Home.py +++ b/ui-poc/Home.py @@ -1,9 +1,19 @@ -import json -from datetime import datetime - +from streamlit_cookies_manager import EncryptedCookieManager import requests +from datetime import datetime +import json import streamlit as st -from streamlit_cookies_manager import EncryptedCookieManager + +# Configure the page – must come immediately after importing Streamlit +st.set_page_config( + page_title="Splitwiser", + page_icon="💰", + layout="wide", + initial_sidebar_state="expanded", +) + + +# 3rd-party / std-lib imports – safe after the call above # Configure the page st.set_page_config( @@ -12,6 +22,11 @@ layout="wide", initial_sidebar_state="expanded", ) +# NOTE: +# set_page_config() must be the very first Streamlit command, +# placed right after `import streamlit as st` and before any +# other `st.` calls (even indirectly via imports). + # Initialize session state variables if "access_token" not in st.session_state: