Skip to content

Commit

Permalink
fix: getQuestionIndex to use questions from config
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Jul 17, 2024
1 parent b26be15 commit e29a76b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ export const getTranslatedQuestion = (intl, question_id) => {
};

export const getQuestionIndex = (question_id) => {
const allQuestions = NEGATIVE_FEEDBACK_QUESTIONS.concat(
POSITIVE_FEEDBACK_QUESTIONS,
const allQuestions = config.settings[
'volto-feedback'
].questions.negativeFeedback.concat(
config.settings['volto-feedback'].questions.positiveFeedback,
);
return allQuestions.findIndex((q) => q.id === question_id);
};
Expand Down

0 comments on commit e29a76b

Please sign in to comment.