Skip to content

Commit 2e309ca

Browse files
committed
Restruture Company Profile
1 parent 7ecb5a2 commit 2e309ca

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/ui/layout.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,14 @@ def render_overview(financial_data):
140140
with st.container():
141141
st.markdown("#### Company Profile")
142142
st.expander("Business Summary").write(quotes["longBusinessSummary"])
143-
st.expander("Sector").markdown(
144-
f" [{quotes['sector']}](https://finance.yahoo.com/sectors/{quotes['sectorKey'].lower()}) "
145-
)
146-
st.expander("Industry").markdown(
147-
f" [{quotes['industry']}](https://finance.yahoo.com/sectors/{quotes['sectorKey'].lower()}/{quotes['industryKey'].lower()}) "
148-
)
143+
sector_name = quotes["sector"]
144+
sector_key = quotes["sectorKey"].lower()
145+
sector_url = f"https://finance.yahoo.com/sectors/{sector_key}"
146+
st.expander("Sector").markdown(f" [{sector_name}]({sector_url}) ")
147+
industry_name = quotes["industry"]
148+
industry_key = quotes["industryKey"].lower()
149+
industry_url = f"https://finance.yahoo.com/sectors/{sector_key}/{industry_key}"
150+
st.expander("Industry").markdown(f" [{industry_name}]({industry_url}) ")
149151
st.expander("Country").write(quotes["country"])
150152
st.expander("Website").write(quotes["website"])
151153

0 commit comments

Comments
 (0)