This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/routes/CreateNewTeam/components Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ const Error = ({ name }) => {
30
30
} ;
31
31
32
32
function EditRoleForm ( { onChange, role } ) {
33
- const [ startMonthVisible , setStartMonthVisible ] = useState ( false ) ;
34
33
const onRoleChange = ( state ) => {
35
34
if ( state . hasValidationErrors ) {
36
35
onChange ( false ) ;
@@ -121,9 +120,9 @@ function EditRoleForm({ onChange, role }) {
121
120
< Error name = "durationWeeks" />
122
121
</ td >
123
122
< td >
124
- { startMonthVisible ? (
123
+ { role . startMonth ? (
125
124
< >
126
- < Field name = "startMonth" initialValue = { Date . now ( ) } >
125
+ < Field name = "startMonth" initialValue = { role . startMonth } >
127
126
{ ( props ) => (
128
127
< MonthPicker
129
128
name = { props . input . name }
@@ -143,7 +142,9 @@ function EditRoleForm({ onChange, role }) {
143
142
< div styleName = "flex-container" >
144
143
< button
145
144
styleName = "toggle-button"
146
- onClick = { ( ) => setStartMonthVisible ( true ) }
145
+ onClick = { ( ) =>
146
+ onRoleChange ( { values : { startMonth : Date . now ( ) } } )
147
+ }
147
148
>
148
149
Add Start Month
149
150
</ button >
Original file line number Diff line number Diff line change @@ -148,9 +148,9 @@ function SubmitContainer({
148
148
. then ( ( ) => {
149
149
setTimeout ( ( ) => {
150
150
dispatch ( clearSearchedRoles ( ) ) ;
151
- // Backend api create project has sync issue, so delay 2 seconds
151
+ // Backend api create project has sync issue, so delay 4 seconds
152
152
navigate ( "/taas/myteams" ) ;
153
- } , 2000 ) ;
153
+ } , 4000 ) ;
154
154
} )
155
155
. catch ( ( err ) => {
156
156
setRequestLoading ( false ) ;
You can’t perform that action at this time.
0 commit comments