import moment from 'moment' import { useCallback } from 'react' import { Col, Row } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import { User } from '../../../../../types/group-management/user' type GroupMemberRowProps = { user: User selectUser: (user: User) => void unselectUser: (user: User) => void selected: boolean } export default function UserRow({ user, selectUser, unselectUser, selected, }: GroupMemberRowProps) { const { t } = useTranslation() const handleSelectUser = useCallback( (event, user) => { if (event.target.checked) { selectUser(user) } else { unselectUser(user) } }, [selectUser, unselectUser] ) return (