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:
@@ -4,6 +4,7 @@ import Button from '@mui/material/Button';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { forwardRef } from 'react';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -15,6 +16,19 @@ const defaultValues = {
|
||||
email: '',
|
||||
};
|
||||
|
||||
const StyledTextField = forwardRef((props, ref) => (
|
||||
<TextField
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
));
|
||||
|
||||
function ForgotPasswordPage({ t }) {
|
||||
const schema = yup.object().shape({
|
||||
email: yup.string().email(t('email_error')).required(t('email_error')),
|
||||
@@ -63,7 +77,7 @@ function ForgotPasswordPage({ t }) {
|
||||
name="email"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
label={t('email')}
|
||||
type="email"
|
||||
@@ -72,11 +86,6 @@ function ForgotPasswordPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -7,6 +7,7 @@ import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { forwardRef } from 'react';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -20,6 +21,19 @@ const defaultValues = {
|
||||
remember: false,
|
||||
};
|
||||
|
||||
const StyledTextField = forwardRef((props, ref) => (
|
||||
<TextField
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
));
|
||||
|
||||
function SignInPage({ t }) {
|
||||
const schema = yup.object().shape({
|
||||
email: yup.string().email(t('email_error')).required(t('email_error')),
|
||||
@@ -72,7 +86,7 @@ function SignInPage({ t }) {
|
||||
name="email"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('email')}
|
||||
@@ -83,11 +97,6 @@ function SignInPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -96,7 +105,7 @@ function SignInPage({ t }) {
|
||||
name="password"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('password')}
|
||||
@@ -106,11 +115,6 @@ function SignInPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -146,7 +150,7 @@ function SignInPage({ t }) {
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
className="w-[220px] mt-32 text-base uppercase rounded-xl"
|
||||
aria-label="Sign in"
|
||||
aria-label={t('sign_in_btn')}
|
||||
disabled={_.isEmpty(dirtyFields) || !isValid}
|
||||
type="submit"
|
||||
size="large"
|
||||
|
||||
@@ -4,6 +4,7 @@ import Button from '@mui/material/Button';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { forwardRef } from 'react';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -18,6 +19,19 @@ const defaultValues = {
|
||||
passwordConfirm: '',
|
||||
};
|
||||
|
||||
const StyledTextField = forwardRef((props, ref) => (
|
||||
<TextField
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
borderRadius: '10px',
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
));
|
||||
|
||||
function SignUpPage({ t }) {
|
||||
const schema = yup.object().shape({
|
||||
name: yup.string().required(t('name_error')),
|
||||
@@ -78,7 +92,7 @@ function SignUpPage({ t }) {
|
||||
name="name"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('name')}
|
||||
@@ -89,11 +103,6 @@ function SignUpPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -102,7 +111,7 @@ function SignUpPage({ t }) {
|
||||
name="email"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('email')}
|
||||
@@ -112,11 +121,6 @@ function SignUpPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -125,7 +129,7 @@ function SignUpPage({ t }) {
|
||||
name="password"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('password')}
|
||||
@@ -135,11 +139,6 @@ function SignUpPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
@@ -148,7 +147,7 @@ function SignUpPage({ t }) {
|
||||
name="passwordConfirm"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<TextField
|
||||
<StyledTextField
|
||||
{...field}
|
||||
className="mb-28"
|
||||
label={t('password_confirm')}
|
||||
@@ -158,11 +157,6 @@ function SignUpPage({ t }) {
|
||||
variant="outlined"
|
||||
required
|
||||
fullWidth
|
||||
InputProps={{
|
||||
sx: {
|
||||
background: (theme) => theme.palette.background.paper,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user