From 02f5889e4dac4c78afe0979b486e34fe435de973 Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Wed, 20 Nov 2024 19:20:13 +0800 Subject: [PATCH] moved connect dialog to main header --- .../AppLayout/OrganizationDropdown.tsx | 14 ++- .../layouts/AppLayout/ProjectDropdown.tsx | 96 +++++++++---------- .../LayoutHeader/LayoutHeader.tsx | 18 ++-- apps/studio/pages/project/[ref]/index.tsx | 1 - 4 files changed, 61 insertions(+), 68 deletions(-) diff --git a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx index e870b080122..039c9ff5d81 100644 --- a/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/OrganizationDropdown.tsx @@ -50,14 +50,12 @@ const OrganizationDropdown = ({ isNewNav = false }: OrganizationDropdownProps) =
-
- -
+
diff --git a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx index 5e477b21b4a..e2d465bcaa6 100644 --- a/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/ProjectDropdown.tsx @@ -117,58 +117,56 @@ const ProjectDropdown = ({ isNewNav = false }: ProjectDropdownProps) => { } return IS_PLATFORM ? ( -
- - - - - - - - - No projects found - - 7 ? 'h-[210px]' : ''}> - {projects?.map((project) => ( - - ))} - - - {projectCreationEnabled && ( - <> - - - { + + + + + + + + + No projects found + + 7 ? 'h-[210px]' : ''}> + {projects?.map((project) => ( + + ))} + + + {projectCreationEnabled && ( + <> + + + { + setOpen(false) + router.push(`/new/${selectedOrganization?.slug}`) + }} + onClick={() => setOpen(false)} + > + { setOpen(false) - router.push(`/new/${selectedOrganization?.slug}`) }} - onClick={() => setOpen(false)} + className="w-full flex items-center gap-2" > - { - setOpen(false) - }} - className="w-full flex items-center gap-2" - > - -

New project

- -
-
- - )} -
-
-
-
-
+ +

New project

+ + + + + )} + +
+
+
) : (