Fixed dumb mistake
This commit is contained in:
		
							parent
							
								
									84326d430a
								
							
						
					
					
						commit
						d4c1e991d0
					
				@ -45,14 +45,15 @@ func (g *guestbookForm) Render() app.UI {
 | 
			
		||||
				e.PreventDefault()
 | 
			
		||||
				if g.name == "" || g.message == "" {
 | 
			
		||||
					fmt.Printf("Error: one or more field(s) are empty. For now unhandled\n")
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
				if len(g.name) > 40 || len(g.message) > 360 {
 | 
			
		||||
					fmt.Printf("Error: Your message is too long fucker\n")
 | 
			
		||||
					g.gbModalOpen = true
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
				g.clear()
 | 
			
		||||
				g.OnSubmit(g.name, g.message)
 | 
			
		||||
				g.clear()
 | 
			
		||||
			}),
 | 
			
		||||
		app.If(
 | 
			
		||||
			g.gbModalOpen,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@ -4,4 +4,4 @@ go 1.17
 | 
			
		||||
 | 
			
		||||
require github.com/maxence-charriere/go-app/v9 v9.3.3
 | 
			
		||||
 | 
			
		||||
require github.com/google/uuid v1.2.0 // indirect
 | 
			
		||||
require github.com/google/uuid v1.3.0 // indirect
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								go.sum
									
									
									
									
									
								
							@ -1,8 +1,9 @@
 | 
			
		||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 | 
			
		||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 | 
			
		||||
github.com/gomarkdown/markdown v0.0.0-20210408062403-ad838ccf8cdd/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
 | 
			
		||||
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
 | 
			
		||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
			
		||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
 | 
			
		||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
			
		||||
github.com/maxence-charriere/go-app/v9 v9.3.3 h1:vo+1oohWMfTQ0S3eg9JOjuFEy1n3bVNgeDi4eHNfMzA=
 | 
			
		||||
github.com/maxence-charriere/go-app/v9 v9.3.3/go.mod h1:zo0n1kh4OMKn7P+MrTUUi7QwUMU2HOfHsZ293TITtxI=
 | 
			
		||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user