File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ class LoginComponent extends React.Component{
77 constructor ( props , context ) {
88 super ( props , context ) ;
99 this . handleSubmit = this . handleSubmit . bind ( this ) ;
10+ this . handleDeleteMessage = this . handleDeleteMessage . bind ( this ) ;
1011 this . state = {
1112 error : ''
1213 } ;
@@ -31,11 +32,15 @@ class LoginComponent extends React.Component{
3132 } ) ;
3233 }
3334
35+ handleDeleteMessage ( ) {
36+ this . setState ( { error : '' } ) ;
37+ }
38+
3439 render ( ) {
3540 let error = < span > </ span > ;
3641 if ( this . state . error ) {
3742 error = < div className = "notification is-danger" >
38- < button className = "delete" > </ button >
43+ < button className = "delete" onClick = { this . handleDeleteMessage } > </ button >
3944 { this . state . error }
4045 </ div > ;
4146 }
@@ -73,11 +78,6 @@ class LoginComponent extends React.Component{
7378 < p className = "control" >
7479 < button className = "button is-primary" > Login</ button >
7580 </ p >
76- < p className = "has-text-centered" >
77- < a href = "register.html" > Register an Account</ a >
78- |
79- < a href = "#" > Forgot password</ a >
80- </ p >
8181 </ div >
8282 </ form >
8383 </ div >
You can’t perform that action at this time.
0 commit comments