File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ function Send() {
8181 const classes = useStyles ( ) ;
8282 const dispatch = useDispatch ( ) ;
8383 const { id } = useSelector ( state => state . signInReducer ) ;
84+ const { isConnecting } = useSelector ( state => state . connectingReducer ) ;
8485 useEffect ( ( ) => {
8586 dispatch ( setPath ( 'Send' ) )
8687 } ) ;
@@ -125,6 +126,7 @@ function Send() {
125126 < Button
126127 variant = "contained"
127128 className = { classes . button }
129+ disabled = { isConnecting }
128130 onClick = { ( ) => {
129131 setValue ( {
130132 ...value ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ function SignIn() {
1010 const classes = useStyles ( ) ;
1111 const dispatch = useDispatch ( ) ;
1212 const { snackbar } = useSelector ( state => state . signInReducer ) ;
13+ const { isConnecting } = useSelector ( state => state . connectingReducer ) ;
1314 const [ data , setData ] = React . useState ( {
1415 id : '' ,
1516 password : '' ,
@@ -61,7 +62,7 @@ function SignIn() {
6162 />
6263 </ form >
6364 < div className = { classes . buttonContainer } >
64- < Button id = 'signInButton' className = { classes . button } variant = "contained" onClick = { signIn } >
65+ < Button id = 'signInButton' className = { classes . button } variant = "contained" onClick = { signIn } disabled = { isConnecting } >
6566 Sign in
6667 </ Button >
6768 </ div >
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ function SignUp() {
1010 const classes = useStyles ( ) ;
1111 const dispatch = useDispatch ( ) ;
1212 const { snackbar } = useSelector ( state => state . signInReducer ) ;
13+ const { isConnecting } = useSelector ( state => state . connectingReducer ) ;
1314 const [ data , setData ] = React . useState ( {
1415 id : '' ,
1516 password : '' ,
@@ -74,7 +75,7 @@ function SignUp() {
7475 </ div >
7576 </ form >
7677 < div className = { classes . buttonContainer } >
77- < Button id = 'signUpButton' className = { classes . button } variant = "contained" onClick = { signUp } disabled = { ! ( data . password && data . password2 && data . password === data . password2 ) } >
78+ < Button id = 'signUpButton' className = { classes . button } variant = "contained" onClick = { signUp } disabled = { ! ( data . id && data . password && data . password2 && data . password === data . password2 && ! isConnecting ) } >
7879 Sign Up
7980 </ Button >
8081 </ div >
You can’t perform that action at this time.
0 commit comments