Skip to content

Commit

Permalink
fix: doc order
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Mar 16, 2024
1 parent 2fe385f commit dae41e0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions demo/app/(mdx)/best-practices/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
order: 2.9
---

# Best Practices

## Reusing components and abstractions

The advantage of invoking Modal imperatively is that it's easy to encapsulate component logic. For example, we can quickly refactor and encapsulate a declarative Modal in scenarios where it is used multiple times.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion demo/lib/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ export const buildFsTree = () => {
tree.push({ to: `/${path}`, title: title || "", order: yaml.order })
}

return tree.sort((a, b) => a.order - b.order)
return tree
.map((i) => ({ ...i, order: i.order || 10e3 }))
.sort((a, b) => a.order - b.order)
}

0 comments on commit dae41e0

Please sign in to comment.