Skip to content

Commit

Permalink
Docs: Fix category index page
Browse files Browse the repository at this point in the history
  • Loading branch information
fuma-nama committed Dec 26, 2023
1 parent 30c0c40 commit 468110e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion apps/docs/app/docs/[mode]/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export default async function Page({
function Category({ page }: { page: Page }): JSX.Element {
const filtered = utils.files.filter(
(docs) =>
docs.info.dirname === page.info.dirname && docs.info.name !== 'index',
docs.type === 'page' &&
docs.info.dirname === page.info.dirname &&
docs.info.name !== 'index',
) as Page[];

return (
Expand Down
4 changes: 2 additions & 2 deletions packages/headless/src/source/page-tree-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ function build(ctx: PageTreeBuilderContext): PageTree.PageTree {
}

export function createPageTreeBuilder({
storage: graph,
storage,
resolveIcon = () => undefined,
}: CreatePageTreeBuilderOptions): PageTreeBuilder {
const context: PageTreeBuilderContext = {
storage: graph,
storage,
resolveIcon(icon) {
if (!icon) return;
return resolveIcon(icon);
Expand Down

0 comments on commit 468110e

Please sign in to comment.