File tree 2 files changed +28
-16
lines changed
2 files changed +28
-16
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tmac-website" ,
3
3
"description" : " Website for the Texas Music Administrators Conference" ,
4
- "version" : " 2.37 .0" ,
4
+ "version" : " 2.38 .0" ,
5
5
"repository" : {
6
6
"type" : " git" ,
7
7
"url" : " https://github.com/m2mathew/tmac-website"
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {
14
14
} from '.' ;
15
15
import { SPONSOR_LEVEL_OPTIONS } from './constants' ;
16
16
import CloudinaryUploadWidget from '../../shared/CloudinaryUploadWidget' ;
17
- import CtaButton from '../../shared/CtaButton' ;
18
17
import CustomSelect from '../../shared/CustomSelect' ;
19
18
import CustomTextField from '../../shared/CustomTextField' ;
20
19
import EnhancedAlert from '../../shared/EnhancedAlert' ;
@@ -73,6 +72,7 @@ const NewSponsorFormikForm: React.FC<Props> = ({
73
72
}
74
73
75
74
const shouldPreventSubmit = hasTouchedForm && ( hasErrors || ! imageUrl ) ;
75
+ const isReadyToSubmit = hasTouchedForm && ! shouldPreventSubmit ;
76
76
77
77
return (
78
78
< Form onSubmit = { onFormikSubmit } >
@@ -169,26 +169,38 @@ const NewSponsorFormikForm: React.FC<Props> = ({
169
169
value = { formikValues . honeypot }
170
170
/>
171
171
172
- < Box
173
- mb = { 2.5 }
174
- mt = { 1 }
175
- width = "100%"
176
- >
177
- < EnhancedAlert severity = { shouldPreventSubmit ? 'error' : 'info' } >
178
- Please enter a value in each required field and upload a logo image.
179
- </ EnhancedAlert >
180
- </ Box >
172
+ < Collapse in = { ! isReadyToSubmit } >
173
+ < Box
174
+ mb = { 2.5 }
175
+ mt = { 1 }
176
+ width = "100%"
177
+ >
178
+ < EnhancedAlert severity = { shouldPreventSubmit ? 'error' : 'info' } >
179
+ Please enter a value in each required field and upload a logo image.
180
+ </ EnhancedAlert >
181
+ </ Box >
182
+ </ Collapse >
183
+
184
+ < Collapse in = { isReadyToSubmit } >
185
+ < Box
186
+ mb = { 2.5 }
187
+ mt = { 1 }
188
+ width = "100%"
189
+ >
190
+ < EnhancedAlert severity = "success" >
191
+ Data looks good! Press the button below to add this sponsor.
192
+ </ EnhancedAlert >
193
+ </ Box >
194
+ </ Collapse >
181
195
182
- < CtaButton
196
+ < Button
183
197
disabled = { shouldPreventSubmit }
184
- fontWeight = { 600 }
185
- rightArrow
186
198
size = "large"
187
199
type = "submit"
188
- width = { 240 }
200
+ variant = "contained"
189
201
>
190
202
Add Sponsor
191
- </ CtaButton >
203
+ </ Button >
192
204
</ Form >
193
205
) ;
194
206
} ;
You can’t perform that action at this time.
0 commit comments