@daeryun/dr_components 0.9.92 → 0.9.94

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.
@@ -147,7 +147,7 @@ const LawInfoNew = ({ data, tel }) => {
147
147
  const news_length = newsLinkList.length;
148
148
  const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
149
149
  return (<>
150
- <H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={faqElementMaxCountInContents}/>
150
+ <H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={h3Template.faqCount}/>
151
151
  {(refer_is_use &&
152
152
  refer_length > 0 &&
153
153
  refer_content_length > 0) ||
@@ -239,7 +239,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
239
239
  <H3Contents
240
240
  h3Template={convertFaqItemType(h3Template)}
241
241
  key={'h3영역' + h3Template.idx}
242
- faqCount={faqElementMaxCountInContents as number}
242
+ faqCount={h3Template.faqCount as number}
243
243
  />
244
244
  {(refer_is_use &&
245
245
  refer_length > 0 &&
@@ -4,12 +4,15 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
4
4
  const { active_faq } = h2Template;
5
5
  const getItemScope = () => {
6
6
  if (active_faq || faqCount >= 2) {
7
- return true;
7
+ return undefined;
8
8
  }
9
- return undefined;
9
+ return true;
10
10
  };
11
11
  const getItemProp = (category) => {
12
12
  if (active_faq || faqCount >= 2) {
13
+ return undefined;
14
+ }
15
+ else {
13
16
  switch (category) {
14
17
  case 'mainEntity':
15
18
  return 'mainEntity';
@@ -23,10 +26,12 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
23
26
  undefined;
24
27
  }
25
28
  }
26
- return undefined;
27
29
  };
28
30
  const getItemType = (category) => {
29
31
  if (active_faq || faqCount >= 2) {
32
+ return undefined;
33
+ }
34
+ else {
30
35
  switch (category) {
31
36
  case 'question':
32
37
  return 'https://schema.org/Question';
@@ -18,13 +18,15 @@ const H2Contents = ({
18
18
 
19
19
  const getItemScope = (): boolean | undefined => {
20
20
  if (active_faq || (faqCount as number) >= 2) {
21
- return true;
21
+ return undefined;
22
22
  }
23
- return undefined;
23
+ return true;
24
24
  };
25
25
 
26
26
  const getItemProp = (category: ItemPropTypes): string | undefined => {
27
27
  if (active_faq || (faqCount as number) >= 2) {
28
+ return undefined;
29
+ } else {
28
30
  switch (category) {
29
31
  case 'mainEntity':
30
32
  return 'mainEntity';
@@ -38,12 +40,12 @@ const H2Contents = ({
38
40
  undefined;
39
41
  }
40
42
  }
41
-
42
- return undefined;
43
43
  };
44
44
 
45
45
  const getItemType = (category: ItemTypes): string | undefined => {
46
46
  if (active_faq || (faqCount as number) >= 2) {
47
+ return undefined;
48
+ } else {
47
49
  switch (category) {
48
50
  case 'question':
49
51
  return 'https://schema.org/Question';