docs: fixes and refactoring for API reference (#9708)

* docs: fixes and refactoring for API reference

* add route caching

* remove caching

* use next cache
This commit is contained in:
Shahed Nasser
2024-10-22 18:20:06 +03:00
committed by GitHub
parent 6b989353ac
commit b2122c4073
20 changed files with 377 additions and 277 deletions
@@ -134,14 +134,22 @@ export const Sidebar = ({
{!sidebarItems.default.length && !staticSidebarItems && (
<Loading className="px-0" />
)}
{sidebarItems.default.map((item, index) => (
<SidebarItem
item={item}
key={index}
expandItems={expandItems}
hasNextItems={index !== sidebarItems.default.length - 1}
/>
))}
{sidebarItems.default.map((item, index) => {
const itemKey =
item.type === "separator"
? index
: item.type === "link"
? `${item.path}-${index}`
: `${item.title}-${index}`
return (
<SidebarItem
item={item}
key={itemKey}
expandItems={expandItems}
hasNextItems={index !== sidebarItems.default.length - 1}
/>
)
})}
</div>
</div>
</CSSTransition>