@@ -7,14 +7,15 @@ import {
77 SelectValue ,
88} from '@/components/ui/select' ;
99import { useCluster } from '@/contexts/ClusterContext' ;
10- import { ServerIcon , MapPinIcon } from 'lucide-react' ;
10+ import { ServerIcon } from 'lucide-react' ;
1111
1212const ClusterSelector : React . FC = ( ) => {
13- const { clusters, selectedCluster, setSelectedCluster, loading } = useCluster ( ) ;
13+ const { clusters, selectedCluster, setSelectedCluster, loading } =
14+ useCluster ( ) ;
1415
1516 if ( loading ) {
1617 return (
17- < div className = "flex items-center gap-2 text-sm text-muted-foreground " >
18+ < div className = "text-muted-foreground flex items-center gap-2 text-sm" >
1819 < ServerIcon className = "h-4 w-4" />
1920 Loading clusters...
2021 </ div >
@@ -23,7 +24,7 @@ const ClusterSelector: React.FC = () => {
2324
2425 if ( clusters . length === 0 ) {
2526 return (
26- < div className = "flex items-center gap-2 text-sm text-muted-foreground " >
27+ < div className = "text-muted-foreground flex items-center gap-2 text-sm" >
2728 < ServerIcon className = "h-4 w-4" />
2829 No clusters available
2930 </ div >
@@ -32,21 +33,23 @@ const ClusterSelector: React.FC = () => {
3233
3334 const handleClusterChange = ( value : string ) => {
3435 const [ name , location ] = value . split ( '|' ) ;
35- const cluster = clusters . find ( c => c . name === name && c . location === location ) ;
36+ const cluster = clusters . find (
37+ ( c ) => c . name === name && c . location === location ,
38+ ) ;
3639 if ( cluster ) {
3740 setSelectedCluster ( cluster ) ;
3841 }
3942 } ;
4043
41- const selectedValue = selectedCluster
44+ const selectedValue = selectedCluster
4245 ? `${ selectedCluster . name } |${ selectedCluster . location } `
4346 : '' ;
4447
4548 return (
4649 < div className = "flex items-center gap-3" >
4750 < div className = "flex items-center gap-2 text-sm font-medium" >
48- < ServerIcon className = "h-4 w-4 text-primary " />
49- < span > Cluster: </ span >
51+ < ServerIcon className = "text-primary h-4 w-4" />
52+ < span > Connected to </ span >
5053 </ div >
5154 < Select value = { selectedValue } onValueChange = { handleClusterChange } >
5255 < SelectTrigger className = "w-[280px]" >
@@ -60,10 +63,6 @@ const ClusterSelector: React.FC = () => {
6063 < div className = "flex items-center gap-2" >
6164 < div className = "flex flex-col" >
6265 < span className = "font-medium" > { cluster . name } </ span >
63- < div className = "flex items-center gap-1 text-xs text-muted-foreground" >
64- < MapPinIcon className = "h-3 w-3" />
65- { cluster . location }
66- </ div >
6766 </ div >
6867 </ div >
6968 </ SelectItem >
@@ -76,4 +75,3 @@ const ClusterSelector: React.FC = () => {
7675} ;
7776
7877export default ClusterSelector ;
79-
0 commit comments