Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update BranchDropdown

Joshen Lim3bf2a53173c8
diff --git a/studio/components/layouts/AppLayout/BranchDropdown.tsx b/studio/components/layouts/AppLayout/BranchDropdown.tsx
index 6eb09304f71..df881dc7801 100644
--- a/studio/components/layouts/AppLayout/BranchDropdown.tsx
+++ b/studio/components/layouts/AppLayout/BranchDropdown.tsx
@@ -91,29 +91,24 @@ const BranchDropdown = () => {
{isSuccess && branches.length > 0 && (
<div className="flex items-center space-x-2 px-2">
- <Link passHref href={`/project/${ref}`}>
- <a ref={branchNameRef} className="flex items-center space-x-2 text-sm">
- {selectedBranch?.name}
- </a>
- </Link>
-
- <Link passHref href={`/project/${ref}/branches`}>
- <a ref={branchNameRef} className="flex items-center space-x-2">
- {selectedBranch?.is_default ? (
- <Badge color="amber">Production</Badge>
- ) : (
- <Badge color="green">Preview Branch</Badge>
- )}
- </a>
- </Link>
-
<Popover_Shadcn_ open={open} onOpenChange={setOpen} modal={false}>
<PopoverTrigger_Shadcn_ asChild>
<Button
type="text"
- className="px-1"
- icon={<IconCode className="text-scale-1100 rotate-90" strokeWidth={2} size={12} />}
- />
+ className="pr-2"
+ iconRight={
+ <IconCode className="text-scale-1100 rotate-90" strokeWidth={2} size={12} />
+ }
+ >
+ <div className="flex items-center space-x-2">
+ <p className="text-sm">{selectedBranch?.name}</p>
+ {selectedBranch?.is_default ? (
+ <Badge color="amber">Production</Badge>
+ ) : (
+ <Badge color="green">Preview Branch</Badge>
+ )}
+ </div>
+ </Button>
</PopoverTrigger_Shadcn_>
<PopoverContent_Shadcn_
className="p-0"
diff --git a/studio/components/layouts/AppLayout/OrganizationDropdown.tsx b/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
index caa3220099e..2108e48d5ac 100644
--- a/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
+++ b/studio/components/layouts/AppLayout/OrganizationDropdown.tsx
@@ -51,6 +51,7 @@ const OrganizationDropdown = () => {
<div className="flex items-center space-x-2 cursor-pointer">
<Button
type="text"
+ className="pr-2"
iconRight={
<IconCode className="text-scale-1100 rotate-90" strokeWidth={2} size={12} />
}
diff --git a/studio/components/layouts/AppLayout/ProjectDropdown.tsx b/studio/components/layouts/AppLayout/ProjectDropdown.tsx
index ae528bc14c2..66921550296 100644
--- a/studio/components/layouts/AppLayout/ProjectDropdown.tsx
+++ b/studio/components/layouts/AppLayout/ProjectDropdown.tsx
@@ -135,6 +135,7 @@ const ProjectDropdown = () => {
<PopoverTrigger_Shadcn_ asChild>
<Button
type="text"
+ className="pr-2"
iconRight={<IconCode className="text-scale-1100 rotate-90" strokeWidth={2} size={12} />}
>
<div className="flex items-center space-x-2">