Skip to content

Commit db7da3f

Browse files
authored
fix highlight framework tab bug (#1385)
1 parent 5bf59ab commit db7da3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pcweb/components/docpage/navbar/navbar.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ def link_item(name: str, url: str, active_str: str = ""):
7474
elif active_str == "pricing":
7575
active = router_path.contains("pricing")
7676

77+
elif active_str == "framework":
78+
# Check if path contains "docs" but excludes ai-builder, cloud, and hosting
79+
is_docs = router_path.contains("docs")
80+
not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting"))
81+
not_ai_builder = ~router_path.contains("ai-builder")
82+
active = is_docs & not_cloud & not_ai_builder
83+
7784
elif active_str == "docs":
7885
active = rx.cond(
7986
router_path.contains("library"), False, router_path.contains("docs")

0 commit comments

Comments
 (0)