RC-7-home-page (#5)
https://ru.yougile.com/team/a605078664af/#chat:2ae00178ba0d Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -12,6 +12,7 @@ import { withTranslation } from 'react-i18next';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import * as yup from 'yup';
|
||||
import { toBase64 } from 'src/app/utils';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
const MAX_PICTURE_SIZE = 5000000;
|
||||
const AVAILABLE_MEDIA_TYPES = ['image/png', 'image/jpeg'];
|
||||
@@ -26,6 +27,19 @@ const Root = styled(FusePageSimple)(({ theme }) => ({
|
||||
'& .FusePageSimple-sidebarContent': {},
|
||||
}));
|
||||
|
||||
const StyledTextField = forwardRef((props, ref) => (
|
||||
<TextField
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
));
|
||||
|
||||
function ProfilePage({ t }) {
|
||||
const dispatch = useDispatch();
|
||||
const user = useSelector(selectUser);
|
||||
@@ -193,7 +207,7 @@ function ProfilePage({ t }) {
|
||||
name="firstName"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="col-span-2"
|
||||
label={t('first_name')}
|
||||
@@ -202,11 +216,6 @@ function ProfilePage({ t }) {
|
||||
helperText={errors?.firstName?.message}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -215,7 +224,7 @@ function ProfilePage({ t }) {
|
||||
name="lastName"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="col-span-2"
|
||||
label={t('last_name')}
|
||||
@@ -224,11 +233,6 @@ function ProfilePage({ t }) {
|
||||
helperText={errors?.lastName?.message}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -237,7 +241,7 @@ function ProfilePage({ t }) {
|
||||
name="displayName"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="col-span-2"
|
||||
label={t('display_name')}
|
||||
@@ -247,11 +251,6 @@ function ProfilePage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -260,7 +259,7 @@ function ProfilePage({ t }) {
|
||||
name="email"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="col-span-3"
|
||||
label={t('email')}
|
||||
@@ -270,11 +269,6 @@ function ProfilePage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -283,7 +277,7 @@ function ProfilePage({ t }) {
|
||||
name="mobileNumber"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="col-span-3"
|
||||
label={t('mobile_number')}
|
||||
@@ -292,11 +286,6 @@ function ProfilePage({ t }) {
|
||||
helperText={errors?.mobileNumber?.message}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -318,8 +307,9 @@ function ProfilePage({ t }) {
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
padding: 0,
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
// eslint-disable-next-line react/jsx-no-duplicate-props
|
||||
@@ -349,8 +339,9 @@ function ProfilePage({ t }) {
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
padding: 0,
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
// eslint-disable-next-line react/jsx-no-duplicate-props
|
||||
|
||||
Reference in New Issue
Block a user