import {Grid, TextField} from "@mui/material";
import {useTranslations} from "next-intl";

const UserInfo = ({formik}) => {
    const t = useTranslations();

    return (
        <>
            <Grid container justifyContent="space-around" spacing={2} sx={{pb: 2}}>
                <Grid item xs={12} sm={6}>
                    <TextField
                        name="username"
                        label={t("ExpertMangement.text_field_username")}
                        variant="outlined"
                        margin="normal"
                        size="small"
                        value={formik.values.username}
                        onChange={formik.handleChange}
                        onBlur={formik.handleBlur}
                        error={formik.touched.username && !!formik.errors.username}
                        helperText={formik.touched.username && formik.errors.username ? formik.errors.username : null}
                        sx={{width: "100%"}}
                    />
                </Grid>
            </Grid>
        </>
    )
}
export default UserInfo