|
|
@@ -110,13 +110,7 @@ const isValid = step => {
|
|
110
|
110
|
const next = e => {
|
|
111
|
111
|
const validity = isValid(state.step - 1)
|
|
112
|
112
|
if (validity.error) return console.error(validity.error)
|
|
113
|
|
- // TODO: make steps work,
|
|
114
|
|
- // Save or next
|
|
115
|
113
|
if (state.step === props.form.length) {
|
|
116
|
|
- // TODO: call survey service
|
|
117
|
|
- // TODO: in the survey service, create a save function
|
|
118
|
|
- // call service from here, pass it profile id as argument
|
|
119
|
|
- // profileId = answers['what-is-your-user-id']
|
|
120
|
114
|
const questiontoResponseKeyId = {}
|
|
121
|
115
|
props.form.forEach(step => {
|
|
122
|
116
|
step.forEach(prompt => {
|