fix: remove duplicate environment badges from toolbar
SelectValue already renders the badge from the selected item content, so the explicit badge in the trigger and the standalone toolbar badge were redundant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f82ffe7f1
commit
106e2497df
2 files changed
-9
No files matched your search
@@ -38,7 +38,6 @@ export function ConnectionSelector() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SelectValue placeholder="Select connection" />
|
<SelectValue placeholder="Select connection" />
|
||||||
<EnvironmentBadge environment={activeConn?.environment} size="sm" />
|
|
||||||
</div>
|
</div>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useConnections } from "@/hooks/use-connections";
|
|||||||
import { Database, Plus } from "lucide-react";
|
import { Database, Plus } from "lucide-react";
|
||||||
import type { ConnectionConfig, Tab } from "@/types";
|
import type { ConnectionConfig, Tab } from "@/types";
|
||||||
import { getEnvironment } from "@/lib/environment";
|
import { getEnvironment } from "@/lib/environment";
|
||||||
import { EnvironmentBadge } from "@/components/connections/EnvironmentBadge";
|
|
||||||
|
|
||||||
export function Toolbar() {
|
export function Toolbar() {
|
||||||
const [listOpen, setListOpen] = useState(false);
|
const [listOpen, setListOpen] = useState(false);
|
||||||
@@ -58,13 +57,6 @@ export function Toolbar() {
|
|||||||
|
|
||||||
<ReadOnlyToggle />
|
<ReadOnlyToggle />
|
||||||
|
|
||||||
{activeConn?.environment && (
|
|
||||||
<>
|
|
||||||
<Separator orientation="vertical" className="h-5" />
|
|
||||||
<EnvironmentBadge environment={activeConn.environment} size="sm" />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Separator orientation="vertical" className="h-5" />
|
<Separator orientation="vertical" className="h-5" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in new issue
Block a user