@@ -56,6 +56,13 @@ import { useRouter } from 'next/router';
5656import Link from 'next/link' ;
5757import { NonCapitalizedTooltip } from '@/components/utils' ;
5858import { Card } from '@/components/ui/card' ;
59+ import {
60+ Select ,
61+ SelectContent ,
62+ SelectItem ,
63+ SelectTrigger ,
64+ SelectValue ,
65+ } from '@/components/ui/select' ;
5966
6067// Set the refresh interval to align with other pages
6168const REFRESH_INTERVAL = REFRESH_INTERVALS . REFRESH_INTERVAL ;
@@ -2415,25 +2422,25 @@ export function GPUs() {
24152422 { /* Workspace Selector */ }
24162423 { availableWorkspaces . length > 0 && (
24172424 < div className = "flex items-center mr-4" >
2418- < label
2419- htmlFor = "workspace-selector"
2420- className = "text-sm font-medium text-gray-700 mr-2"
2421- >
2425+ < label className = "text-sm font-medium text-gray-700 mr-2" >
24222426 Workspace:
24232427 </ label >
2424- < select
2425- id = "workspace-selector"
2428+ < Select
24262429 value = { selectedWorkspace }
2427- onChange = { ( e ) => setSelectedWorkspace ( e . target . value ) }
2428- className = "px-3 py-1 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-sky-blue focus:border-transparent"
2430+ onValueChange = { setSelectedWorkspace }
24292431 >
2430- < option value = "all" > All Workspaces</ option >
2431- { availableWorkspaces . map ( ( workspace ) => (
2432- < option key = { workspace } value = { workspace } >
2433- { workspace }
2434- </ option >
2435- ) ) }
2436- </ select >
2432+ < SelectTrigger className = "w-40 h-8 text-sm" >
2433+ < SelectValue />
2434+ </ SelectTrigger >
2435+ < SelectContent >
2436+ < SelectItem value = "all" > All Workspaces</ SelectItem >
2437+ { availableWorkspaces . map ( ( workspace ) => (
2438+ < SelectItem key = { workspace } value = { workspace } >
2439+ { workspace }
2440+ </ SelectItem >
2441+ ) ) }
2442+ </ SelectContent >
2443+ </ Select >
24372444 </ div >
24382445 ) }
24392446
0 commit comments