From 6901511ff9d1edf5e447700183db225eeb0df3fd Mon Sep 17 00:00:00 2001 From: ahaapple Date: Tue, 31 Dec 2024 11:22:32 +0800 Subject: [PATCH] Add navigation to AI Image generator page --- frontend/components/image/image-generator.tsx | 5 ++++- .../components/layout/user-account-nav.tsx | 8 +++---- frontend/components/sidebar/sidebar-open.tsx | 22 +++++++++++++++---- frontend/config.ts | 4 ++++ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/frontend/components/image/image-generator.tsx b/frontend/components/image/image-generator.tsx index 4c2a7af3..ccc928b5 100644 --- a/frontend/components/image/image-generator.tsx +++ b/frontend/components/image/image-generator.tsx @@ -149,7 +149,10 @@ export function AIImageGenerator() { return (
- + - - -

Dashboard

+ + +

Images

diff --git a/frontend/components/sidebar/sidebar-open.tsx b/frontend/components/sidebar/sidebar-open.tsx index 2fb0905a..466065e8 100644 --- a/frontend/components/sidebar/sidebar-open.tsx +++ b/frontend/components/sidebar/sidebar-open.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import { useSidebar } from '@/hooks/use-sidebar'; -import { ArrowRightToLine, CircleHelp, Gem, Plus, Settings } from 'lucide-react'; +import { ArrowRightToLine, CircleHelp, Gem, Image, Plus, Settings } from 'lucide-react'; import Link from 'next/link'; import { User } from 'next-auth'; import { UserAccountNav } from '@/components/layout/user-account-nav'; import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import LocaleSelect from '@/components/locale-selection'; -import { useNewGenerateUI, useNewSearch } from '@/hooks/use-new-search'; +import { useNewSearch } from '@/hooks/use-new-search'; import { PageGenUrl } from '@/config'; interface NavBarProps { @@ -18,7 +18,6 @@ interface NavBarProps { export default function SidebarOpen({ user }: NavBarProps) { const { toggleSidebar, isSidebarOpen } = useSidebar(); const handleNewSearch = useNewSearch(); - const handleNewGenerateUI = useNewGenerateUI(); return (
@@ -54,6 +53,21 @@ export default function SidebarOpen({ user }: NavBarProps) { + + + + + + + +

Generate New Image

+
+
+ -

New Generate UI

+

Generate New UI

diff --git a/frontend/config.ts b/frontend/config.ts index 1f80afe1..9b43cda9 100644 --- a/frontend/config.ts +++ b/frontend/config.ts @@ -40,6 +40,10 @@ export const mainNavConfig: MarketingConfig = { title: 'AI Search', href: '/', }, + { + title: 'AI Image', + href: '/generate-image', + }, { title: 'Pricing', href: '/pricing',