@daeryun/dr_components 1.0.6 → 1.0.8

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.
@@ -75,13 +75,13 @@ const LawInfoNew = ({ data, tel }) => {
75
75
  }
76
76
  }, [template]);
77
77
  const handleFaqItemType = (isFaqActive, faqCount) => {
78
- if (isFaqActive || faqCount >= 2) {
78
+ if (isFaqActive || faqCount >= 1) {
79
79
  return undefined;
80
80
  }
81
81
  return 'https://schema.org/FAQPage';
82
82
  };
83
83
  const handleFaqItemScope = (isFaqActive, faqCount) => {
84
- if (isFaqActive || faqCount >= 2) {
84
+ if (isFaqActive || faqCount >= 1) {
85
85
  return undefined;
86
86
  }
87
87
  return true;
@@ -103,7 +103,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
103
103
  }, [template]);
104
104
 
105
105
  const handleFaqItemType = (isFaqActive: boolean, faqCount: number): string | undefined => {
106
- if (isFaqActive || faqCount >= 2) {
106
+ if (isFaqActive || faqCount >= 1) {
107
107
  return undefined;
108
108
  }
109
109
 
@@ -111,7 +111,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
111
111
  };
112
112
 
113
113
  const handleFaqItemScope = (isFaqActive: boolean, faqCount: number): true | undefined => {
114
- if (isFaqActive || faqCount >= 2) {
114
+ if (isFaqActive || faqCount >= 1) {
115
115
  return undefined;
116
116
  }
117
117
 
@@ -5,16 +5,13 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
5
5
  console.log('h2 active_faq :', active_faq);
6
6
  console.log('h2 faqCount :', faqCount);
7
7
  const getItemScope = () => {
8
- if (active_faq || faqCount >= 1) {
9
- return undefined;
8
+ if (active_faq === false && faqCount === 0) {
9
+ return true;
10
10
  }
11
- return true;
11
+ return undefined;
12
12
  };
13
13
  const getItemProp = (category) => {
14
- if (active_faq || faqCount >= 1) {
15
- return undefined;
16
- }
17
- else {
14
+ if (active_faq === false && faqCount === 0) {
18
15
  switch (category) {
19
16
  case 'mainEntity':
20
17
  return 'mainEntity';
@@ -28,12 +25,10 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
28
25
  undefined;
29
26
  }
30
27
  }
28
+ return undefined;
31
29
  };
32
30
  const getItemType = (category) => {
33
- if (active_faq || faqCount >= 1) {
34
- return undefined;
35
- }
36
- else {
31
+ if (active_faq === false && faqCount === 0) {
37
32
  switch (category) {
38
33
  case 'question':
39
34
  return 'https://schema.org/Question';
@@ -43,6 +38,7 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
43
38
  undefined;
44
39
  }
45
40
  }
41
+ return undefined;
46
42
  };
47
43
  return (<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
48
44
  <h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={getItemProp('name')}>
@@ -19,17 +19,15 @@ const H2Contents = ({
19
19
  console.log('h2 faqCount :', faqCount);
20
20
 
21
21
  const getItemScope = (): boolean | undefined => {
22
- if (active_faq || (faqCount as number) >= 1) {
23
- return undefined;
22
+ if (active_faq === false && (faqCount as number) === 0) {
23
+ return true;
24
24
  }
25
25
 
26
- return true;
26
+ return undefined;
27
27
  };
28
28
 
29
29
  const getItemProp = (category: ItemPropTypes): string | undefined => {
30
- if (active_faq || (faqCount as number) >= 1) {
31
- return undefined;
32
- } else {
30
+ if (active_faq === false && (faqCount as number) === 0) {
33
31
  switch (category) {
34
32
  case 'mainEntity':
35
33
  return 'mainEntity';
@@ -43,12 +41,12 @@ const H2Contents = ({
43
41
  undefined;
44
42
  }
45
43
  }
44
+
45
+ return undefined;
46
46
  };
47
47
 
48
48
  const getItemType = (category: ItemTypes): string | undefined => {
49
- if (active_faq || (faqCount as number) >= 1) {
50
- return undefined;
51
- } else {
49
+ if (active_faq === false && (faqCount as number) === 0) {
52
50
  switch (category) {
53
51
  case 'question':
54
52
  return 'https://schema.org/Question';
@@ -58,6 +56,8 @@ const H2Contents = ({
58
56
  undefined;
59
57
  }
60
58
  }
59
+
60
+ return undefined;
61
61
  };
62
62
 
63
63
  return (
@@ -7,16 +7,13 @@ const H3Contents = ({ h3Template, faqCount }) => {
7
7
  console.log('h3 active_faq :', active_faq);
8
8
  console.log('h3 faqCount :', faqCount);
9
9
  const getItemScope = () => {
10
- if (active_faq || faqCount >= 1) {
11
- return undefined;
10
+ if (active_faq === false && faqCount === 0) {
11
+ return true;
12
12
  }
13
- return true;
13
+ return undefined;
14
14
  };
15
15
  const getItemProp = (category) => {
16
- if (active_faq || faqCount >= 1) {
17
- return undefined;
18
- }
19
- else {
16
+ if (active_faq === false && faqCount === 0) {
20
17
  switch (category) {
21
18
  case 'mainEntity':
22
19
  return 'mainEntity';
@@ -30,12 +27,10 @@ const H3Contents = ({ h3Template, faqCount }) => {
30
27
  undefined;
31
28
  }
32
29
  }
30
+ return undefined;
33
31
  };
34
32
  const getItemType = (category) => {
35
- if (active_faq || faqCount >= 1) {
36
- return undefined;
37
- }
38
- else {
33
+ if (active_faq === false && faqCount === 0) {
39
34
  switch (category) {
40
35
  case 'question':
41
36
  return 'https://schema.org/Question';
@@ -45,6 +40,7 @@ const H3Contents = ({ h3Template, faqCount }) => {
45
40
  undefined;
46
41
  }
47
42
  }
43
+ return undefined;
48
44
  };
49
45
  return (<>
50
46
  <div className={'px-[10px] sm:px-[18px]'} key={'h3영역' + h3Template.idx} itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
@@ -13,17 +13,15 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
13
13
  console.log('h3 faqCount :', faqCount);
14
14
 
15
15
  const getItemScope = (): boolean | undefined => {
16
- if (active_faq || (faqCount as number) >= 1) {
17
- return undefined;
16
+ if (active_faq === false && (faqCount as number) === 0) {
17
+ return true;
18
18
  }
19
19
 
20
- return true;
20
+ return undefined;
21
21
  };
22
22
 
23
23
  const getItemProp = (category: ItemPropTypes): string | undefined => {
24
- if (active_faq || (faqCount as number) >= 1) {
25
- return undefined;
26
- } else {
24
+ if (active_faq === false && (faqCount as number) === 0) {
27
25
  switch (category) {
28
26
  case 'mainEntity':
29
27
  return 'mainEntity';
@@ -37,12 +35,12 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
37
35
  undefined;
38
36
  }
39
37
  }
38
+
39
+ return undefined;
40
40
  };
41
41
 
42
42
  const getItemType = (category: ItemTypes): string | undefined => {
43
- if (active_faq || (faqCount as number) >= 1) {
44
- return undefined;
45
- } else {
43
+ if (active_faq === false && (faqCount as number) === 0) {
46
44
  switch (category) {
47
45
  case 'question':
48
46
  return 'https://schema.org/Question';
@@ -52,6 +50,8 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
52
50
  undefined;
53
51
  }
54
52
  }
53
+
54
+ return undefined;
55
55
  };
56
56
 
57
57
  return (