fix: design colors

This commit is contained in:
IlyaDoronin 2024-03-04 19:47:06 +03:00
parent 7291d08d6a
commit 5654c6d502
2 changed files with 21 additions and 21 deletions

@ -9,7 +9,7 @@ import { useEffect, useRef, useState } from "react";
import arrowLeftIcon from "../../assets/icons/arrow_left.svg";
import arrowRightIcon from "../../assets/icons/arrow_right.svg";
import QuizgenegationName from "@utils/quizgenegationName";
import {QuizType} from "@model/quizSettings";
import { QuizType } from "@model/quizSettings";
export default function StepOne() {
const quiz = useCurrentQuiz();
@ -40,19 +40,19 @@ export default function StepOne() {
setCurrentIndex((prevIndex) => Math.min(prevIndex + 1, 1));
};
const handleTypeClick = (typeQuiz: QuizType) => {
setQuizType(quiz.id, typeQuiz);
if (
quiz.name === "" ||
quiz.name === " " ||
quiz.name ===
"No type " + quiz.backendId.toString().slice(-4).replace(/^0/, "1")
) {
updateQuiz(quiz.id, (quiz) => {
quiz.name = QuizgenegationName({ quiz });
});
}
};
const handleTypeClick = (typeQuiz: QuizType) => {
setQuizType(quiz.id, typeQuiz);
if (
quiz.name === "" ||
quiz.name === " " ||
quiz.name ===
"No type " + quiz.backendId.toString().slice(-4).replace(/^0/, "1")
) {
updateQuiz(quiz.id, (quiz) => {
quiz.name = QuizgenegationName({ quiz });
});
}
};
if (!config) return null;
@ -84,7 +84,7 @@ export default function StepOne() {
variant="text"
data-cy="create-quiz-card"
onClick={() => {
handleTypeClick("quiz");
handleTypeClick("quiz");
}}
>
<CreationCard
@ -99,7 +99,7 @@ export default function StepOne() {
ref={(ref) => (buttonRefs.current[1] = ref as HTMLButtonElement)}
variant="text"
onClick={() => {
handleTypeClick("form");
handleTypeClick("form");
}}
>
<CreationCard

@ -234,7 +234,7 @@ const Design1 = createTheme({
main: "#252734",
},
text: {
primary: "#333647",
primary: "#FFFFFF",
secondary: "#F2B133",
},
@ -254,7 +254,7 @@ const Design2 = createTheme({
main: "#252734",
},
text: {
primary: "#333647",
primary: "#FFFFFF",
secondary: "#758E4F",
},
@ -294,7 +294,7 @@ const Design4 = createTheme({
main: "#252734",
},
text: {
primary: "#333647",
primary: "#FFFFFF",
secondary: "#F2B133",
},
@ -374,7 +374,7 @@ const Design7 = createTheme({
main: "#252734",
},
text: {
primary: "#333647",
primary: "#FFFFFF",
secondary: "#F2B133",
},
@ -394,7 +394,7 @@ const Design9 = createTheme({
main: "#252734",
},
text: {
primary: "#333647",
primary: "#FFFFFF",
secondary: "#758E4F",
},