Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Aug 20, 2024
1 parent 100565d commit d6343f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/src/components/Navigation/DocsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import MenuIcon from '~icons/material-symbols/menu';
type Page = MDXInstance<Record<string, any>>;

interface DocsMenuProps {
docsPages: MDXInstance<Record<string, any>>[];
docsPages: Page[];
currentPageUrl: string;
title: string;
}

const groupPagesByDirectory = (pages: Page[]): Record<string, Page[]> => {
const groupPagesByDirectory = (pages: Page[]): { groupedPages: Record<string, Page[]>, indexPages: Record<string, Page> } => {
const groupedPages: Record<string, Page[]> = {};
const indexPages: Record<string, Page> = {};

Expand Down Expand Up @@ -89,7 +89,7 @@ const DocsMenu: React.FC<DocsMenuProps> = ({ docsPages, currentPageUrl, title })
)}
</div>
<ul className='list-none m-0 p-0'>
{pages.map((page) => (
{pages.map((page: Page) => (
<li key={page.url} className='border-b border-gray-200 last:border-0'>
<a
href={page.url}
Expand Down Expand Up @@ -126,7 +126,7 @@ const DocsMenu: React.FC<DocsMenuProps> = ({ docsPages, currentPageUrl, title })
)}
</div>
<ul className='list-none m-0 p-0'>
{pages.map((page) => (
{pages.map((page: Page) => (
<li key={page.url} className='border-b border-gray-200 last:border-0'>
<a
href={page.url}
Expand All @@ -149,4 +149,4 @@ const DocsMenu: React.FC<DocsMenuProps> = ({ docsPages, currentPageUrl, title })
);
};

export default DocsMenu;
export default DocsMenu;

0 comments on commit d6343f9

Please sign in to comment.