l-min-components 1.7.1581 → 1.7.1582

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1581",
3
+ "version": "1.7.1582",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -1,11 +1,11 @@
1
1
  // import React, { useEffect, useState } from "react";
2
- // import {
3
- // QuestionSection,
4
- // QuestionSectionAction,
5
- // QuestionSectionWithAnalysis,
6
- // } from "../style.jsx";
7
- // import Tabs from "../components/tabs.jsx";
8
- // import useReportUtils from "../../hooks/useRreportUtils.jsx";
2
+ import {
3
+ QuestionSection,
4
+ // QuestionSectionAction,
5
+ // QuestionSectionWithAnalysis,
6
+ } from "../style.jsx";
7
+ import Tabs from "../components/tabs.jsx";
8
+ import useReportUtils from "../../hooks/useRreportUtils.jsx";
9
9
  // import Response from "../components/response.jsx";
10
10
  // import AnalysisButton from "../components/analysisButton.jsx";
11
11
  // import QuestionDropdown from "../components/questionDropdown.jsx";
@@ -13,29 +13,27 @@
13
13
 
14
14
  // import useTranslation from "../../../../hooks/useTranslation.jsx";
15
15
  // import wordStore from "../../../../mc/wordStore.json";
16
- const QuizWritten = (
17
- {
18
- // data,
19
- // aiData,
20
- // setToggle,
21
- // answerData,
22
- // isPersonal,
23
- // defaultSelected = 1,
24
- }
25
- ) => {
16
+ const QuizWritten = ({
17
+ // data,
18
+ // aiData,
19
+ // setToggle,
20
+ answerData,
21
+ // isPersonal,
22
+ // defaultSelected = 1,
23
+ }) => {
26
24
  // const { findText } = useTranslation(wordStore);
27
25
  // const [selected, setSelected] = useState(defaultSelected);
28
26
  // const [analysis, setAnalysis] = useState(null);
29
- // const { quizResponses } = useReportUtils();
30
- // const quizList = quizResponses({
31
- // responses: answerData?.answer?.data?.data?.responses,
32
- // type: "written",
33
- // });
27
+ const { quizResponses } = useReportUtils();
28
+ const quizList = quizResponses({
29
+ responses: answerData?.answer?.data?.data?.responses,
30
+ type: "written",
31
+ });
34
32
 
35
- // const selectionList = quizList?.map((item) => ({
36
- // value: item?.key,
37
- // label: `Reponses ${item?.key}`,
38
- // }));
33
+ const selectionList = quizList?.map((item) => ({
34
+ value: item?.key,
35
+ label: `Reponses ${item?.key}`,
36
+ }));
39
37
  // const selectedResponse =
40
38
  // quizList?.find((item) => item?.key === selected) || {};
41
39
 
@@ -88,7 +86,15 @@ const QuizWritten = (
88
86
  // </QuestionSectionAction>
89
87
  // </QuestionSectionWithAnalysis>
90
88
  // </QuestionSection>
91
- <></>
89
+ <>
90
+ <QuestionSection>
91
+ <Tabs
92
+ options={selectionList}
93
+ selected={selected}
94
+ onChange={setSelected}
95
+ />
96
+ </QuestionSection>
97
+ </>
92
98
  );
93
99
  };
94
100
  export default QuizWritten;