Commit db454ec 1 parent cd42be4 commit db454ec Copy full SHA for db454ec
File tree 1 file changed +3
-4
lines changed
src/pages/AccessManagement
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const Users: FC = () => {
51
51
52
52
const { getRolesData } = useRole ( ) ;
53
53
54
- let rows =
54
+ const rows =
55
55
getUserIsSuccess && getUserData ?. data ? (
56
56
getUserData ?. data . map ( ( user : any ) => {
57
57
return (
@@ -88,7 +88,7 @@ const Users: FC = () => {
88
88
} ;
89
89
90
90
const handleCreateUser = ( ) => {
91
- let userRole : any = [ ] ;
91
+ const userRole : any = [ ] ;
92
92
if ( SelectedRole !== '' ) {
93
93
userRole . push ( SelectedRole ) ;
94
94
}
@@ -99,7 +99,6 @@ const Users: FC = () => {
99
99
if ( getUserData ?. data ?. includes ( createUserInput ) || createUserInput . length < 3 ) {
100
100
return true ;
101
101
}
102
-
103
102
if ( SelectedRole !== '' ) {
104
103
if ( getRolesData ?. data ?. includes ( SelectedRole ) ) {
105
104
return false ;
@@ -201,7 +200,7 @@ const Users: FC = () => {
201
200
color = "gray"
202
201
className = { classes . modalActionBtn }
203
202
onClick = { handleCreateUser }
204
- disabled = { createVaildtion ( ) } >
203
+ disabled = { createVaildtion ( ) || ! ! createUserData ?. data } >
205
204
Create
206
205
</ Button >
207
206
< Button onClick = { handleClose } variant = "outline" color = "gray" className = { classes . modalCancelBtn } >
You can’t perform that action at this time.
0 commit comments