Skip to content

Commit

Permalink
Merge pull request #105 from Sairam90/main
Browse files Browse the repository at this point in the history
  • Loading branch information
blackary authored Aug 8, 2024
2 parents 18492be + c4c34e5 commit 2c1d6e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/st_pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
from dataclasses import dataclass
from pathlib import Path
from typing import cast

import streamlit as st
import toml
Expand Down Expand Up @@ -75,7 +76,10 @@ def _get_nav_from_toml(

for page in pages:
if page.is_section:
current_section = f"{translate_icon(page.icon)} {page.name}"
if page.icon is not None:
current_section = f"{translate_icon(page.icon)} {page.name}"
else:
current_section = cast(str, page.name)
if page.name in st.session_state[HIDE_PAGES_KEY]:
sections_to_drop.append(current_section)
continue
Expand Down

0 comments on commit 2c1d6e4

Please sign in to comment.