l-min-components 1.7.1528 → 1.7.1530
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
|
@@ -71,6 +71,7 @@ const ReportQuestions = ({
|
|
|
71
71
|
answerData,
|
|
72
72
|
onSwitchQuestion,
|
|
73
73
|
loading,
|
|
74
|
+
mainTitle,
|
|
74
75
|
}) => {
|
|
75
76
|
const { findText } = useTranslation(wordStore);
|
|
76
77
|
const [questionList, setQuestionList] = useState([]);
|
|
@@ -175,9 +176,9 @@ const ReportQuestions = ({
|
|
|
175
176
|
)}
|
|
176
177
|
<Header onClick={onClose}>
|
|
177
178
|
<ArrowLeft />
|
|
178
|
-
{question && (
|
|
179
|
+
{question && !loading && (
|
|
179
180
|
<h1>
|
|
180
|
-
{question
|
|
181
|
+
{mainTitle || question?.label}
|
|
181
182
|
|
|
182
183
|
{/* {question.type && <span>({question.type})</span>} */}
|
|
183
184
|
</h1>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useContext, useEffect, useMemo, useState } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { useContext, useEffect, useMemo, useState } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
import {
|
|
4
4
|
UserCardContainer,
|
|
5
5
|
Avatar,
|
|
@@ -27,15 +27,15 @@ const UserCard = ({ isOpen, findText }) => {
|
|
|
27
27
|
: ".learngual.com";
|
|
28
28
|
date.setDate(date.getDate() + 28);
|
|
29
29
|
document.cookie =
|
|
30
|
-
|
|
30
|
+
"activeDeveloperAccount=" +
|
|
31
31
|
generalData?.selectedAccount?.id +
|
|
32
32
|
`; path=/; domain=${domain}; expires=${date.toUTCString()};`;
|
|
33
33
|
document.cookie =
|
|
34
|
-
|
|
34
|
+
"defaultAccountID=" +
|
|
35
35
|
generalData?.selectedAccount?.id +
|
|
36
36
|
`; path=/; domain=${domain}; expires=${date.toUTCString()};`;
|
|
37
37
|
document.cookie =
|
|
38
|
-
|
|
38
|
+
"defaultAccountType=" +
|
|
39
39
|
generalData?.selectedAccount?.type +
|
|
40
40
|
`; path=/; domain=${domain}; expires=${date.toUTCString()};`;
|
|
41
41
|
handleSetDefaultAccount(generalData?.selectedAccount?.id);
|
|
@@ -43,7 +43,7 @@ const UserCard = ({ isOpen, findText }) => {
|
|
|
43
43
|
setOrganizationName(generalData?.selectedAccount?.display_name);
|
|
44
44
|
} else {
|
|
45
45
|
return setOrganizationName(
|
|
46
|
-
generalData?.selectedAccount?.metadata?.organization_name
|
|
46
|
+
generalData?.selectedAccount?.metadata?.organization_name
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -60,7 +60,7 @@ const UserCard = ({ isOpen, findText }) => {
|
|
|
60
60
|
isOpen={isOpen}
|
|
61
61
|
onClick={() => {
|
|
62
62
|
if (
|
|
63
|
-
generalData?.selectedAccount?.type?.toLowerCase() !==
|
|
63
|
+
generalData?.selectedAccount?.type?.toLowerCase() !== "personal"
|
|
64
64
|
) {
|
|
65
65
|
window.location.href = `/${generalData?.selectedAccount?.type?.toLowerCase()}/profile`;
|
|
66
66
|
}
|
|
@@ -70,22 +70,25 @@ const UserCard = ({ isOpen, findText }) => {
|
|
|
70
70
|
isOpen={isOpen}
|
|
71
71
|
onClick={() => {
|
|
72
72
|
if (
|
|
73
|
-
generalData?.selectedAccount?.type?.toLowerCase() !==
|
|
73
|
+
generalData?.selectedAccount?.type?.toLowerCase() !==
|
|
74
|
+
"personal" ||
|
|
75
|
+
generalData?.selectedAccount?.type?.toLowerCase() !==
|
|
76
|
+
"developer"
|
|
74
77
|
) {
|
|
75
78
|
window.location.href = `/${generalData?.selectedAccount?.type?.toLowerCase()}/profile`;
|
|
76
79
|
}
|
|
77
80
|
}}
|
|
78
81
|
>
|
|
79
|
-
<UserName>{findText(
|
|
82
|
+
<UserName>{findText("Hello")}</UserName>
|
|
80
83
|
<Handle
|
|
81
84
|
style={{
|
|
82
|
-
textTransform:
|
|
85
|
+
textTransform: "capitalize",
|
|
83
86
|
fontWeight: 700,
|
|
84
87
|
fontSize: 15,
|
|
85
88
|
}}
|
|
86
89
|
>
|
|
87
90
|
{accountName?.length >= 25
|
|
88
|
-
? accountName?.slice(0, 25)?.trim() +
|
|
91
|
+
? accountName?.slice(0, 25)?.trim() + "..."
|
|
89
92
|
: accountName}
|
|
90
93
|
</Handle>
|
|
91
94
|
</UserDetail>
|