Skip to content

Commit 56c40ee

Browse files
committed
feat(web): restore Explorer/External section headings in mobile nav
1 parent b315d86 commit 56c40ee

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎apps/web/src/components/layout/MobileNav.tsx‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export function MobileNav() {
8686
</div>
8787
</div>
8888

89+
<div className="px-3 pt-3 pb-2 text-sm font-semibold uppercase tracking-widest text-muted-foreground">
90+
Explorer
91+
</div>
8992
{NAV_ITEMS.map(({ href, label, icon: Icon, external }, idx) => {
9093
const active = !external && isActive(href);
9194
const className = `relative flex items-center gap-4 pl-4 pr-3 py-4 rounded-xl text-lg font-medium transition-colors ${
@@ -94,9 +97,9 @@ export function MobileNav() {
9497
: "text-foreground/80 hover:text-foreground active:bg-muted/50"
9598
}`;
9699
const iconClass = `h-6 w-6 shrink-0 ${active ? "text-accent" : "text-muted-foreground"}`;
97-
// Insert a divider before the first external item so users see a
98-
// clear break between in-app routes and outbound links.
99-
const showDivider = external && !NAV_ITEMS[idx - 1]?.external;
100+
// Inject a divider + "External" heading the first time we cross
101+
// from in-app routes to outbound links.
102+
const isFirstExternal = external && !NAV_ITEMS[idx - 1]?.external;
100103

101104
const item = external ? (
102105
<a
@@ -119,10 +122,13 @@ export function MobileNav() {
119122
</Link>
120123
);
121124

122-
if (showDivider) {
125+
if (isFirstExternal) {
123126
return (
124127
<div key={`group-${href}`}>
125-
<div className="my-3 h-px bg-border/60" aria-hidden />
128+
<div className="my-4 h-px bg-border/60" aria-hidden />
129+
<div className="px-3 pt-1 pb-2 text-sm font-semibold uppercase tracking-widest text-muted-foreground">
130+
External
131+
</div>
126132
{item}
127133
</div>
128134
);

0 commit comments

Comments
 (0)