Simplify navigation and modernize profile and sign-in
Magent CI/CD / verify (push) Successful in 10m55s
Magent CI/CD / deploy-prod (push) Skipped
Magent CI/CD / deploy-beta (push) Successful in 1m58s

This commit is contained in:
2026-09-06 18:24:18 +12:00
parent b5e4c57e93
commit 4d67567d4c
15 changed files with 620 additions and 755 deletions
+18
View File
@@ -0,0 +1,18 @@
'use client'
import { usePathname, useRouter } from 'next/navigation'
import { CONFIG_GROUPS } from '../admin/configNavigation'
export default function SettingsNavigation() {
const pathname = usePathname()
const router = useRouter()
const current = CONFIG_GROUPS.flatMap((group) => group.items).find((item) => item.href === pathname)
if (pathname === '/admin') return null
return <nav className="settings-top-navigation" aria-label="Settings navigation">
<a href="/admin"> All settings</a>
<label><span>Jump to</span><select aria-label="Settings section" value={current?.href ?? '/admin'} onChange={(event) => router.push(event.target.value)}>
<option value="/admin">Settings overview</option>
{CONFIG_GROUPS.map((group) => <optgroup label={group.title} key={group.title}>{group.items.map((item) => <option key={item.href} value={item.href}>{item.label}</option>)}</optgroup>)}
</select></label>
</nav>
}