перевод имён вопросов в амо модалке
This commit is contained in:
parent
c9d7da58f4
commit
cf3b60e19f
@ -20,7 +20,7 @@ interface Props {
|
||||
isModalOpen: boolean;
|
||||
isTryRemoveAccount: boolean;
|
||||
quizID: number;
|
||||
questions: AnyTypedQuizQuestion
|
||||
questions: AnyTypedQuizQuestion[]
|
||||
}
|
||||
|
||||
const FCTranslate = {
|
||||
@ -151,6 +151,22 @@ export const useAmoIntegration = ({ isModalOpen, isTryRemoveAccount, quizID, que
|
||||
|
||||
}, [isModalOpen, isTryRemoveAccount]);
|
||||
|
||||
useEffect(() => {
|
||||
const transletedQuestions = {}
|
||||
|
||||
Object.keys(selectedQuestions).forEach((column) => {
|
||||
selectedQuestions[column].forEach((minifiedData) => {
|
||||
const q = questions.find(e => e.backendId === Number(minifiedData.id)) || {}
|
||||
transletedQuestions[column] = {
|
||||
...minifiedData,
|
||||
title: q.title || transletedQuestions[column].title
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
setSelectedQuestions(transletedQuestions)
|
||||
}, [questions])
|
||||
|
||||
useEffect(() => {
|
||||
getPipelines({
|
||||
page: pageOfPipelines,
|
||||
|
Loading…
Reference in New Issue
Block a user