diff --git a/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx b/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx index 255d9afd..cb7735d8 100644 --- a/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx +++ b/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx @@ -59,91 +59,46 @@ interface Props { isDragging: boolean; } -const IconAndrom = (isExpanded: boolean, switchState: string) => { +const IconAndrom = (switchState: string) => { switch (switchState) { case "variant": - return ( - - ); + return ; case "images": return ( - + ); case "varimg": return ( ); case "emoji": - return ( - - ); + return ; case "text": - return ( - - ); + return ; case "select": return ( - + ); case "date": - return ( - - ); + return ; case "number": - return ( - - ); + return ; case "file": return ( - + ); case "page": - return ( - - ); + return ; case "rating": return ( - + ); default: return ( - + ); } }; @@ -209,7 +164,7 @@ export default function QuestionsPageCard({ sx={{ cursor: "pointer" }} onClick={() => setOpen((isOpened) => !isOpened)} > - {IconAndrom(question.expanded, question.type)} + {IconAndrom(question.type)} { createQuestion(quizId); - updateQuestionsList(quizId, 0, { - expanded: true, - }); + updateQuestionsList( + quizId, + listQuestions[quizId].length - 1 || 0, + { + expanded: true, + } + ); }} >