@daeryun/dr_components 1.0.13 → 1.0.14
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.
|
@@ -74,16 +74,22 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}, [template]);
|
|
77
|
-
const handleFaqItemType = (isFaqActive,
|
|
78
|
-
if (isFaqActive
|
|
77
|
+
const handleFaqItemType = (isFaqActive, faqElementMaxCountInContents) => {
|
|
78
|
+
if (isFaqActive && faqElementMaxCountInContents === 0) {
|
|
79
79
|
return undefined;
|
|
80
80
|
}
|
|
81
|
+
if (isFaqActive && faqElementMaxCountInContents >= 2) {
|
|
82
|
+
return 'https://schema.org/FAQPage';
|
|
83
|
+
}
|
|
81
84
|
return 'https://schema.org/FAQPage';
|
|
82
85
|
};
|
|
83
|
-
const handleFaqItemScope = (isFaqActive,
|
|
84
|
-
if (isFaqActive
|
|
86
|
+
const handleFaqItemScope = (isFaqActive, faqElementMaxCountInContents) => {
|
|
87
|
+
if (isFaqActive && faqElementMaxCountInContents === 0) {
|
|
85
88
|
return undefined;
|
|
86
89
|
}
|
|
90
|
+
if (isFaqActive && faqElementMaxCountInContents >= 2) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
87
93
|
return true;
|
|
88
94
|
};
|
|
89
95
|
const convertFaqItemType = (template) => {
|
|
@@ -102,19 +102,27 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
102
102
|
}
|
|
103
103
|
}, [template]);
|
|
104
104
|
|
|
105
|
-
const handleFaqItemType = (isFaqActive: boolean,
|
|
106
|
-
if (isFaqActive
|
|
105
|
+
const handleFaqItemType = (isFaqActive: boolean, faqElementMaxCountInContents: number): string | undefined => {
|
|
106
|
+
if (isFaqActive && faqElementMaxCountInContents === 0) {
|
|
107
107
|
return undefined;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
if (isFaqActive && faqElementMaxCountInContents >= 2) {
|
|
111
|
+
return 'https://schema.org/FAQPage';
|
|
112
|
+
}
|
|
113
|
+
|
|
110
114
|
return 'https://schema.org/FAQPage';
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
const handleFaqItemScope = (isFaqActive: boolean,
|
|
114
|
-
if (isFaqActive
|
|
117
|
+
const handleFaqItemScope = (isFaqActive: boolean, faqElementMaxCountInContents: number): true | undefined => {
|
|
118
|
+
if (isFaqActive && faqElementMaxCountInContents === 0) {
|
|
115
119
|
return undefined;
|
|
116
120
|
}
|
|
117
121
|
|
|
122
|
+
if (isFaqActive && faqElementMaxCountInContents >= 2) {
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
|
|
118
126
|
return true;
|
|
119
127
|
};
|
|
120
128
|
|