@@ -10,22 +10,12 @@ import { sortBy, unionBy } from "lodash";
1010import { ChevronsUpDown , MapPin } from "lucide-react" ;
1111import * as React from "react" ;
1212import { memo , useEffect , useState } from "react" ;
13- import { FcLinux } from "react-icons/fc" ;
1413import { useElementSize } from "@/hooks/useElementSize" ;
15- import { getOperatingSystem } from "@/hooks/useOperatingSystem" ;
16- import { OperatingSystem } from "@/interfaces/OperatingSystem" ;
1714import { Peer } from "@/interfaces/Peer" ;
1815
1916const MapPinIcon = memo ( ( ) => < MapPin size = { 12 } /> ) ;
2017MapPinIcon . displayName = "MapPinIcon" ;
2118
22- const LinuxIcon = memo ( ( ) => (
23- < span className = { "grayscale brightness-[100%] contrast-[40%]" } >
24- < FcLinux className = { "text-white text-lg min-w-[20px] brightness-150" } />
25- </ span >
26- ) ) ;
27- LinuxIcon . displayName = "LinuxIcon" ;
28-
2919interface MultiSelectProps {
3020 value ?: Peer ;
3121 onChange : React . Dispatch < React . SetStateAction < Peer | undefined > > ;
@@ -63,11 +53,6 @@ export function PeerSelector({
6353 // Sort
6454 let options = sortBy ( [ ...peers ] , "name" ) as Peer [ ] ;
6555
66- // Filter out peers that are not linux
67- options = options . filter ( ( peer ) => {
68- return getOperatingSystem ( peer . os ) === OperatingSystem . LINUX ;
69- } ) ;
70-
7156 // Filter out excluded peers
7257 if ( excludedPeers ) {
7358 options = options . filter ( ( peer ) => {
@@ -128,7 +113,6 @@ export function PeerSelector({
128113 }
129114 >
130115 < div className = { "flex items-center gap-2.5 text-sm" } >
131- < LinuxIcon />
132116 < TextWithTooltip text = { value . name } maxChars = { 20 } />
133117 </ div >
134118
@@ -151,7 +135,7 @@ export function PeerSelector({
151135 </ PopoverTrigger >
152136 < PopoverContent
153137 hideWhenDetached = { false }
154- className = "w-full p-0 shadow-sm shadow-nb-gray-950"
138+ className = "w-full p-0 shadow-sm shadow-nb-gray-950"
155139 style = { {
156140 width : width ,
157141 } }
@@ -169,9 +153,7 @@ export function PeerSelector({
169153 { unfilteredItems . length == 0 && ! search && (
170154 < div className = { "max-w-xs mx-auto" } >
171155 < DropdownInfoText >
172- {
173- "Seems like you don't have any Linux peers to assign as a routing peer."
174- }
156+ { "No peers available to select." }
175157 </ DropdownInfoText >
176158 </ div >
177159 ) }
@@ -197,7 +179,6 @@ export function PeerSelector({
197179 : "text-nb-gray-300" ,
198180 ) }
199181 >
200- < LinuxIcon />
201182 < TextWithTooltip text = { option . name } maxChars = { 20 } />
202183 </ div >
203184
@@ -221,4 +202,4 @@ export function PeerSelector({
221202 </ PopoverContent >
222203 </ Popover >
223204 ) ;
224- }
205+ }
0 commit comments