File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
TemplateSettingsPage/TemplateGeneralSettingsPage Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,15 @@ const CreateWorkspaceExperimentRouter: FC = () => {
64
64
65
65
const toggleOptedOut = ( ) => {
66
66
const key = optOutKey ( optOutQuery . data . templateId ) ;
67
- const current = localStorage . getItem ( key ) === "true" ;
67
+ const storedValue = localStorage . getItem ( key ) ;
68
+
69
+ const current = storedValue
70
+ ? storedValue === "true"
71
+ : Boolean ( templateQuery . data ?. use_classic_parameter_flow ) ;
72
+
68
73
localStorage . setItem ( key , ( ! current ) . toString ( ) ) ;
69
74
optOutQuery . refetch ( ) ;
70
75
} ;
71
-
72
76
return (
73
77
< ExperimentalFormContext . Provider value = { { toggleOptedOut } } >
74
78
{ optOutQuery . data . optedOut ? (
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
242
242
< span >
243
243
Show the original workspace creation form without dynamic
244
244
parameters or live updates. Recommended if your provisioners
245
- aren't updated or the new form causes issues.
245
+ aren't updated or the new form causes issues.{ " " }
246
246
< strong >
247
247
Users can always manually switch experiences in the
248
248
workspace creation form.
You can’t perform that action at this time.
0 commit comments