From c8cb6771a4aa7bebeecacb85a70d5c108b362e73 Mon Sep 17 00:00:00 2001 From: Lluis Agusti Date: Tue, 1 Jul 2025 20:47:53 +0400 Subject: [PATCH] chore: wip --- .../frontend/src/app/(platform)/layout.tsx | 61 +------------ .../src/app/(platform)/signup/page.tsx | 2 +- .../{agptui => layout/Navbar}/Navbar.tsx | 60 +++++-------- .../Navbar/components}/NavbarLink.tsx | 30 ++++--- .../Navbar/components}/ProfilePopoutMenu.tsx | 36 +++----- .../src/components/layout/Navbar/helpers.ts | 86 +++++++++++++++++++ 6 files changed, 142 insertions(+), 133 deletions(-) rename autogpt_platform/frontend/src/components/{agptui => layout/Navbar}/Navbar.tsx (73%) rename autogpt_platform/frontend/src/components/{agptui => layout/Navbar/components}/NavbarLink.tsx (77%) rename autogpt_platform/frontend/src/components/{agptui => layout/Navbar/components}/ProfilePopoutMenu.tsx (94%) create mode 100644 autogpt_platform/frontend/src/components/layout/Navbar/helpers.ts diff --git a/autogpt_platform/frontend/src/app/(platform)/layout.tsx b/autogpt_platform/frontend/src/app/(platform)/layout.tsx index 10a278f5f7..3146df9e6b 100644 --- a/autogpt_platform/frontend/src/app/(platform)/layout.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/layout.tsx @@ -1,67 +1,10 @@ +import { Navbar } from "@/components/layout/Navbar/Navbar"; import { ReactNode } from "react"; -import { Navbar } from "@/components/agptui/Navbar"; -import { IconType } from "@/components/ui/icons"; export default function PlatformLayout({ children }: { children: ReactNode }) { return ( <> - +
{children}
); diff --git a/autogpt_platform/frontend/src/app/(platform)/signup/page.tsx b/autogpt_platform/frontend/src/app/(platform)/signup/page.tsx index 3165da0000..6497dc381b 100644 --- a/autogpt_platform/frontend/src/app/(platform)/signup/page.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/signup/page.tsx @@ -135,7 +135,7 @@ export default function SignupPage() { />
- + void; - }[]; - }[]; -} +import { Button } from "../../atoms/Button/Button"; +import { accountMeunItems, loggedInLinks } from "./helpers"; async function getProfileData() { const api = new BackendAPI(); @@ -39,32 +19,38 @@ async function getProfileData() { return profile; } -export const Navbar = async ({ links, menuItemGroups }: NavbarProps) => { +export async function Navbar() { const { user } = await getServerUser(); const isLoggedIn = user !== null; + let profile: ProfileDetails | null = null; + if (isLoggedIn) { profile = await getProfileData(); } return ( <> -