Skip to content

Commit

Permalink
remove usage of query params
Browse files Browse the repository at this point in the history
  • Loading branch information
pfei-sa committed Apr 6, 2024
1 parent 2018f94 commit af99e27
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

with st.sidebar:
st.title("Partners")
default_partner = st.query_params.get("partner", "aeroplan")
default_partner = "aeroplan"
partner = (
st.radio(
"Partners",
Expand All @@ -31,12 +31,10 @@
)
or default_partner
)
st.query_params["partner"] = partner


default_route = st.query_params.get("route", "US - LHR - NYC, CA - HKG")
default_route = "US - LHR - NYC, CA - HKG"
route = st.text_input("Route", default_route, max_chars=300, key="route").upper()
st.query_params["route"] = route


@st.cache_data(ttl=timedelta(minutes=15))
Expand Down Expand Up @@ -197,7 +195,7 @@ def expand_code(code: str, expand_country: bool, expand_city: bool) -> List[str]
displayed_route = set(route_df["route"].unique())

with st.expander("Raw data"):
st.table(route_df)
st.write(route_df)

with st.expander("Route without availability"):
st.write(
Expand Down

0 comments on commit af99e27

Please sign in to comment.