import { useTranslation } from 'react-i18next' import { cn } from '@/utils/classnames' type RoleSelectorProps = { onChange: (value: string) => void value: string } const RoleSelector = ({ onChange, value, }: RoleSelectorProps) => { const { t } = useTranslation() const options = [ { key: 'Student', value: t('form.schoolRole.option.student', { ns: 'education' }), }, { key: 'Teacher', value: t('form.schoolRole.option.teacher', { ns: 'education' }), }, { key: 'School-Administrator', value: t('form.schoolRole.option.administrator', { ns: 'education' }), }, ] return (
{ options.map(option => (
onChange(option.key)} >
{option.value}
)) }
) } export default RoleSelector