'use client'; import * as React from 'react'; export function ServerSelector(props: { currentIndex: number; onChange: (value: number) => void; servers: any[]; }) { const { currentIndex, onChange, servers } = props; const [index, setIndex] = React.useState(currentIndex); React.useEffect(() => { onChange(index); }, [index]); return ( ); }