import { Select } from 'antd'; import React, { useCallback } from 'react'; import { t, useUserInfoList } from 'tailchat-shared'; interface UserSelectorProps { allUserIds: string[]; userIds?: string[]; onChange?: (userIds: string[]) => void; } export const UserSelector: React.FC = React.memo((props) => { const { allUserIds, userIds, onChange } = props; const userInfoList = useUserInfoList(allUserIds); const handleChange = useCallback( (userIds: string[]) => { typeof onChange === 'function' && onChange(userIds); }, [onChange] ); return ( ); }); UserSelector.displayName = 'UserSelector';