Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
1c88f82c
Commit
1c88f82c
authored
Oct 30, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused files
parent
b26b6a4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
71 deletions
+0
-71
MyProfileFieldsName.tsx
ui/myProfile/fields/MyProfileFieldsName.tsx
+0
-32
AuthModalFieldEmail.tsx
ui/snippets/auth/fields/AuthModalFieldEmail.tsx
+0
-39
No files found.
ui/myProfile/fields/MyProfileFieldsName.tsx
deleted
100644 → 0
View file @
b26b6a4c
import
{
FormControl
,
Input
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
{
useController
,
useFormContext
}
from
'
react-hook-form
'
;
import
type
{
FormFields
}
from
'
../types
'
;
import
FormInputPlaceholder
from
'
ui/shared/forms/inputs/FormInputPlaceholder
'
;
const
MyProfileFieldsName
=
()
=>
{
const
{
control
}
=
useFormContext
<
FormFields
>
();
const
{
field
,
fieldState
,
formState
}
=
useController
<
FormFields
,
'
name
'
>
({
control
,
name
:
'
name
'
,
});
const
isDisabled
=
formState
.
isSubmitting
;
return
(
<
FormControl
variant=
"floating"
isDisabled=
{
isDisabled
}
size=
"md"
mb=
{
3
}
>
<
Input
{
...
field
}
isInvalid=
{
Boolean
(
fieldState
.
error
)
}
isDisabled=
{
isDisabled
}
isReadOnly=
{
true
}
autoComplete=
"off"
/>
<
FormInputPlaceholder
text=
"Name"
error=
{
fieldState
.
error
}
/>
</
FormControl
>
);
};
export
default
React
.
memo
(
MyProfileFieldsName
);
ui/snippets/auth/fields/AuthModalFieldEmail.tsx
deleted
100644 → 0
View file @
b26b6a4c
import
{
chakra
,
FormControl
,
Input
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
{
useController
,
useFormContext
}
from
'
react-hook-form
'
;
import
type
{
EmailFormFields
}
from
'
../types
'
;
import
FormInputPlaceholder
from
'
ui/shared/forms/inputs/FormInputPlaceholder
'
;
import
{
EMAIL_REGEXP
}
from
'
ui/shared/forms/validators/email
'
;
interface
Props
{
className
?:
string
;
}
const
AuthModalFieldEmail
=
({
className
}:
Props
)
=>
{
const
{
control
}
=
useFormContext
<
EmailFormFields
>
();
const
{
field
,
fieldState
,
formState
}
=
useController
<
EmailFormFields
,
'
email
'
>
({
control
,
name
:
'
email
'
,
rules
:
{
required
:
true
,
pattern
:
EMAIL_REGEXP
},
});
const
isDisabled
=
formState
.
isSubmitting
;
return
(
<
FormControl
className=
{
className
}
variant=
"floating"
isDisabled=
{
isDisabled
}
isRequired
size=
"md"
>
<
Input
{
...
field
}
required
isInvalid=
{
Boolean
(
fieldState
.
error
)
}
isDisabled=
{
isDisabled
}
autoComplete=
"off"
bgColor=
"dialog_bg"
/>
<
FormInputPlaceholder
text=
"Email"
error=
{
fieldState
.
error
}
/>
</
FormControl
>
);
};
export
default
React
.
memo
(
chakra
(
AuthModalFieldEmail
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment