From 5ae0176d32e5eb14e8a8066f7224cfcd5ec82e45 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Tue, 1 Jul 2025 10:00:11 +1000 Subject: [PATCH] replace branch dropdown button --- .../layouts/AppLayout/BranchDropdown.tsx | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx index 16ee7b41755..2021f3df781 100644 --- a/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx +++ b/apps/studio/components/layouts/AppLayout/BranchDropdown.tsx @@ -210,16 +210,20 @@ export const BranchDropdown = () => { )} - {isSuccess && isBranchingEnabled && branches.length > 0 && ( + {isSuccess && ( <> - {selectedBranch?.name} + {isBranchingEnabled ? selectedBranch?.name : 'main'} - {selectedBranch?.is_default ? ( - Production + {isBranchingEnabled ? ( + selectedBranch?.is_default ? ( + Production + ) : ( + Preview Branch + ) ) : ( - Preview Branch + Production )} @@ -232,24 +236,14 @@ export const BranchDropdown = () => { /> - + )} - - {isSuccess && !isBranchingEnabled && ( - - - - - - - - - )} ) }