File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
site/src/pages/CreateWorkspacePage Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,7 @@ export const CreateWorkspacePageViewExperimental: FC<
108
108
owner,
109
109
setOwner,
110
110
} ) => {
111
- const [ suggestedName , setSuggestedName ] = useState ( ( ) =>
112
- generateWorkspaceName ( ) ,
113
- ) ;
111
+ const [ suggestedName , setSuggestedName ] = useState ( generateWorkspaceName ) ;
114
112
const [ showPresetParameters , setShowPresetParameters ] = useState ( false ) ;
115
113
const id = useId ( ) ;
116
114
const workspaceNameInputRef = useRef < HTMLInputElement > ( null ) ;
@@ -124,14 +122,14 @@ export const CreateWorkspacePageViewExperimental: FC<
124
122
125
123
// Only touched fields are sent to the websocket
126
124
// Autofilled parameters are marked as touched since they have been modified
127
- const initialTouched = parameters . reduce (
125
+ const initialTouched = parameters . reduce < Record < string , boolean > > (
128
126
( touched , parameter ) => {
129
127
if ( autofillByName [ parameter . name ] !== undefined ) {
130
128
touched [ parameter . name ] = true ;
131
129
}
132
130
return touched ;
133
131
} ,
134
- { } as Record < string , boolean > ,
132
+ { } ,
135
133
) ;
136
134
137
135
// The form parameters values hold the working state of the parameters that will be submitted when creating a workspace
You can’t perform that action at this time.
0 commit comments