mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* finesse optical alignment * improvements * actions styling * improvements * margins * improvements * fix docs * fix * improve schema warning admonition * misc fixes * tweaks * docs and improvements * alphabetical sidebar navigation * remove alert-error * fix build error * Tiny fixes * tiny docs update * semantic description * handle intro pages * note NoPermission component * docs sidebar ordering --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import NavigationItem from '@/components/side-navigation-item'
|
|
import { docsConfig } from '@/config/docs'
|
|
|
|
function SideNavigation() {
|
|
return (
|
|
<nav className="min-w-[220px]">
|
|
{docsConfig.sidebarNav.map((section, i) => (
|
|
<div key={`${section.title}-${i}`} className="pb-10 space-y-0.5">
|
|
<div className="font-mono uppercase text-xs text-foreground-lighter/75 mb-2 px-6 tracking-widest">
|
|
{section.title}
|
|
</div>
|
|
{(section.sortOrder === 'alphabetical'
|
|
? (() => {
|
|
const priorityItems = section.items.filter((item) => item.priority)
|
|
const regularItems = section.items
|
|
.filter((item) => !item.priority)
|
|
.sort((a, b) => a.title.localeCompare(b.title))
|
|
return [...priorityItems, ...regularItems]
|
|
})()
|
|
: section.items
|
|
).map((item, i) => (
|
|
<NavigationItem item={item} key={`${item.href}-${i}`} />
|
|
))}
|
|
</div>
|
|
))}
|
|
</nav>
|
|
)
|
|
}
|
|
|
|
export default SideNavigation
|