fix(nx-dev): mobile menu, adding ai chat and changelog (#19887)
This commit is contained in:
parent
f9fc3dd42b
commit
b897303815
@ -1,11 +1,12 @@
|
|||||||
import { FeedContainer } from '@nx/nx-dev/feature-ai';
|
import { FeedContainer } from '@nx/nx-dev/feature-ai';
|
||||||
import { DocumentationHeader } from '@nx/nx-dev/ui-common';
|
import { DocumentationHeader, SidebarContainer } from '@nx/nx-dev/ui-common';
|
||||||
import { NextSeo } from 'next-seo';
|
import { NextSeo } from 'next-seo';
|
||||||
import { useNavToggle } from '../../lib/navigation-toggle.effect';
|
import { useNavToggle } from '../../lib/navigation-toggle.effect';
|
||||||
import { cx } from '@nx/nx-dev/ui-primitives';
|
import { cx } from '@nx/nx-dev/ui-primitives';
|
||||||
|
|
||||||
export default function AiDocs(): JSX.Element {
|
export default function AiDocs(): JSX.Element {
|
||||||
const { toggleNav, navIsOpen } = useNavToggle();
|
const { toggleNav, navIsOpen } = useNavToggle();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NextSeo
|
<NextSeo
|
||||||
@ -38,6 +39,10 @@ export default function AiDocs(): JSX.Element {
|
|||||||
role="main"
|
role="main"
|
||||||
className="flex h-full flex-1 overflow-y-hidden"
|
className="flex h-full flex-1 overflow-y-hidden"
|
||||||
>
|
>
|
||||||
|
<div className="hidden">
|
||||||
|
<SidebarContainer menu={{ sections: [] }} navIsOpen={navIsOpen} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<FeedContainer />
|
<FeedContainer />
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -180,7 +180,10 @@ export function SidebarMobile({
|
|||||||
const isNxCloud: boolean = router.asPath.startsWith('/nx-cloud');
|
const isNxCloud: boolean = router.asPath.startsWith('/nx-cloud');
|
||||||
const isAPI: boolean = router.asPath.startsWith('/nx-api');
|
const isAPI: boolean = router.asPath.startsWith('/nx-api');
|
||||||
const isPlugins: boolean = router.asPath.startsWith('/extending-nx');
|
const isPlugins: boolean = router.asPath.startsWith('/extending-nx');
|
||||||
const isNx: boolean = !isNxCloud && !isAPI && !isPlugins;
|
const isChangelog: boolean = router.asPath.startsWith('/changelog');
|
||||||
|
const isAiChat: boolean = router.asPath.startsWith('/ai-chat');
|
||||||
|
const isNx: boolean =
|
||||||
|
!isNxCloud && !isAPI && !isPlugins && !isChangelog && !isAiChat;
|
||||||
|
|
||||||
const sections = [
|
const sections = [
|
||||||
{ name: 'Home', href: '/', current: false },
|
{ name: 'Home', href: '/', current: false },
|
||||||
@ -190,15 +193,25 @@ export function SidebarMobile({
|
|||||||
href: '/nx-cloud/intro/ci-with-nx',
|
href: '/nx-cloud/intro/ci-with-nx',
|
||||||
current: isNxCloud,
|
current: isNxCloud,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Extending Nx',
|
||||||
|
href: '/extending-nx/intro/getting-started',
|
||||||
|
current: isPlugins,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'API',
|
name: 'API',
|
||||||
href: '/nx-api',
|
href: '/nx-api',
|
||||||
current: isAPI,
|
current: isAPI,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Extending Nx',
|
name: 'Changelog',
|
||||||
href: '/extending-nx/intro/getting-started',
|
href: '/changelog',
|
||||||
current: isPlugins,
|
current: isChangelog,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'AI Chat (beta)',
|
||||||
|
href: '/ai-chat',
|
||||||
|
current: isAiChat,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user