fix: move module-level JSX icons inside component to resolve _jsxDEV error
Some checks failed
Build / build (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
Lint & Type Check / lint (push) Has been cancelled
Security Scan / semgrep (push) Has been cancelled
Security Scan / dependency-check (push) Has been cancelled
Test / test (18.x) (push) Has been cancelled
Test / test (20.x) (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
Lint & Type Check / lint (push) Has been cancelled
Security Scan / semgrep (push) Has been cancelled
Security Scan / dependency-check (push) Has been cancelled
Test / test (18.x) (push) Has been cancelled
Test / test (20.x) (push) Has been cancelled
This commit is contained in:
parent
c67ee049b6
commit
06b748dade
1 changed files with 25 additions and 58 deletions
|
|
@ -26,61 +26,16 @@ interface DocNavItem {
|
||||||
description?: string;
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const docNavigation: DocNavItem[] = [
|
const docNavigation: Omit<DocNavItem, "icon">[] = [
|
||||||
{
|
{ title: "Overview", path: "/docs", description: "Get started with AeThex" },
|
||||||
title: "Overview",
|
{ title: "Getting Started", path: "/docs/getting-started", description: "Quick start guide" },
|
||||||
path: "/docs",
|
{ title: "Platform", path: "/docs/platform", description: "Platform architecture & features" },
|
||||||
icon: <BookOpen className="h-5 w-5" />,
|
{ title: "API Reference", path: "/docs/api", description: "Complete API documentation" },
|
||||||
description: "Get started with AeThex",
|
{ title: "CLI", path: "/docs/cli", description: "Command line tools" },
|
||||||
},
|
{ title: "Tutorials", path: "/docs/tutorials", description: "Step-by-step guides" },
|
||||||
{
|
{ title: "Examples", path: "/docs/examples", description: "Code examples" },
|
||||||
title: "Getting Started",
|
{ title: "Integrations", path: "/docs/integrations", description: "Third-party integrations" },
|
||||||
path: "/docs/getting-started",
|
{ title: "Curriculum", path: "/docs/curriculum", description: "Learning paths" },
|
||||||
icon: <Zap className="h-5 w-5" />,
|
|
||||||
description: "Quick start guide",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Platform",
|
|
||||||
path: "/docs/platform",
|
|
||||||
icon: <Layers className="h-5 w-5" />,
|
|
||||||
description: "Platform architecture & features",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "API Reference",
|
|
||||||
path: "/docs/api",
|
|
||||||
icon: <Code2 className="h-5 w-5" />,
|
|
||||||
description: "Complete API documentation",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "CLI",
|
|
||||||
path: "/docs/cli",
|
|
||||||
icon: <GitBranch className="h-5 w-5" />,
|
|
||||||
description: "Command line tools",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Tutorials",
|
|
||||||
path: "/docs/tutorials",
|
|
||||||
icon: <BookMarked className="h-5 w-5" />,
|
|
||||||
description: "Step-by-step guides",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Examples",
|
|
||||||
path: "/docs/examples",
|
|
||||||
icon: <FileText className="h-5 w-5" />,
|
|
||||||
description: "Code examples",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Integrations",
|
|
||||||
path: "/docs/integrations",
|
|
||||||
icon: <Zap className="h-5 w-5" />,
|
|
||||||
description: "Third-party integrations",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Curriculum",
|
|
||||||
path: "/docs/curriculum",
|
|
||||||
icon: <BookOpen className="h-5 w-5" />,
|
|
||||||
description: "Learning paths",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
interface DocsLayoutProps {
|
interface DocsLayoutProps {
|
||||||
|
|
@ -103,15 +58,27 @@ function DocsLayoutContent({
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { colors, toggleTheme, theme } = useDocsTheme();
|
const { colors, toggleTheme, theme } = useDocsTheme();
|
||||||
|
|
||||||
|
const navWithIcons: DocNavItem[] = useMemo(() => [
|
||||||
|
{ ...docNavigation[0], icon: <BookOpen className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[1], icon: <Zap className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[2], icon: <Layers className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[3], icon: <Code2 className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[4], icon: <GitBranch className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[5], icon: <BookMarked className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[6], icon: <FileText className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[7], icon: <Zap className="h-5 w-5" /> },
|
||||||
|
{ ...docNavigation[8], icon: <BookOpen className="h-5 w-5" /> },
|
||||||
|
], []);
|
||||||
|
|
||||||
const filteredNav = useMemo(() => {
|
const filteredNav = useMemo(() => {
|
||||||
if (!searchQuery) return docNavigation;
|
if (!searchQuery) return navWithIcons;
|
||||||
const query = searchQuery.toLowerCase();
|
const query = searchQuery.toLowerCase();
|
||||||
return docNavigation.filter(
|
return navWithIcons.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
item.title.toLowerCase().includes(query) ||
|
item.title.toLowerCase().includes(query) ||
|
||||||
item.description?.toLowerCase().includes(query),
|
item.description?.toLowerCase().includes(query),
|
||||||
);
|
);
|
||||||
}, [searchQuery]);
|
}, [searchQuery, navWithIcons]);
|
||||||
|
|
||||||
const isCurrentPage = (path: string) => location.pathname === path;
|
const isCurrentPage = (path: string) => location.pathname === path;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue