From 106d8b6ad7843a4082735112750c7e2e10ef93b8 Mon Sep 17 00:00:00 2001 From: Nastya Date: Fri, 25 Jul 2025 14:37:50 +0300 Subject: [PATCH] fix config widget --- lib/api/hooks.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/api/hooks.ts b/lib/api/hooks.ts index 41341f6..75d8634 100644 --- a/lib/api/hooks.ts +++ b/lib/api/hooks.ts @@ -80,7 +80,13 @@ export function useQuizData(quizId: string, preview: boolean = false) { console.log(data); addQuestions(data.questions); changeNextLoading(false); - return data; + + // Возвращаем полную структуру данных с настройками из store + const currentState = useQuizStore.getState(); + return { + ...currentState, + questions: [...currentState.questions, ...data.questions], + }; } catch (p) { console.log(p); setPage(questions.length);