@daeryun/dr_components 0.9.93 → 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.
@@ -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';