@daeryun/dr_components 0.9.79 → 0.9.80

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,17 +74,14 @@ const LawInfoNew = ({ data, tel }) => {
74
74
  }
75
75
  }
76
76
  }, [template]);
77
- console.log('faqCount : ', faqCount);
78
77
  const handleFaqItemType = (isFaqActive, faqCount) => {
79
- let isActive = faqCount >= 2 ? true : false;
80
- if (isFaqActive || isActive) {
78
+ if (isFaqActive || faqCount >= 2) {
81
79
  return 'https://schema.org/FAQPage';
82
80
  }
83
81
  return undefined;
84
82
  };
85
83
  const handleFaqItemScope = (isFaqActive, faqCount) => {
86
- let isActive = faqCount >= 2 ? true : false;
87
- if (isFaqActive || isActive) {
84
+ if (isFaqActive || faqCount >= 2) {
88
85
  return true;
89
86
  }
90
87
  return undefined;
@@ -107,6 +104,11 @@ const LawInfoNew = ({ data, tel }) => {
107
104
  }
108
105
  return template;
109
106
  };
107
+ // Microdata 설정 확인
108
+ console.log('isFaqActive:', isFaqActive);
109
+ console.log('faqCount : ', faqCount);
110
+ console.log('itemType:', handleFaqItemType(isFaqActive, faqCount));
111
+ console.log('itemScope:', handleFaqItemScope(isFaqActive, faqCount));
110
112
  return (<div itemScope={handleFaqItemScope(isFaqActive, faqCount)} itemType={handleFaqItemType(isFaqActive, faqCount)} ref={printRef}>
111
113
  <div id={'sub_contents'}>
112
114
  <div className="font-[SUIT]] relative m-auto mb-[60px] w-[90%] max-w-screen-2xl max-xs:mb-[30px]">
@@ -102,22 +102,16 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
102
102
  }
103
103
  }, [template]);
104
104
 
105
- console.log('faqCount : ', faqCount);
106
-
107
105
  const handleFaqItemType = (isFaqActive: boolean, faqCount: number): string | undefined => {
108
- let isActive = faqCount >= 2 ? true : false;
109
-
110
- if (isFaqActive || isActive) {
106
+ if (isFaqActive || faqCount >= 2) {
111
107
  return 'https://schema.org/FAQPage';
112
108
  }
113
109
 
114
110
  return undefined;
115
111
  };
116
112
 
117
- const handleFaqItemScope = (isFaqActive: boolean, faqCount: number): boolean | undefined => {
118
- let isActive = faqCount >= 2 ? true : false;
119
-
120
- if (isFaqActive || isActive) {
113
+ const handleFaqItemScope = (isFaqActive: boolean, faqCount: number): true | undefined => {
114
+ if (isFaqActive || faqCount >= 2) {
121
115
  return true;
122
116
  }
123
117
 
@@ -145,6 +139,12 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
145
139
  return template;
146
140
  };
147
141
 
142
+ // Microdata 설정 확인
143
+ console.log('isFaqActive:', isFaqActive);
144
+ console.log('faqCount : ', faqCount);
145
+ console.log('itemType:', handleFaqItemType(isFaqActive, faqCount as number));
146
+ console.log('itemScope:', handleFaqItemScope(isFaqActive, faqCount as number));
147
+
148
148
  return (
149
149
  <div
150
150
  itemScope={handleFaqItemScope(isFaqActive, faqCount as number)}