@daeryun/dr_components 0.9.95 → 0.9.96

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.
@@ -81,7 +81,6 @@ const LawInfoNew = ({ data, tel }) => {
81
81
  return 'https://schema.org/FAQPage';
82
82
  };
83
83
  const handleFaqItemScope = (isFaqActive, faqCount) => {
84
- // isFaqActive가 true이거나 faqCount가 2 이상인 경우
85
84
  if (isFaqActive || faqCount >= 2) {
86
85
  return undefined;
87
86
  }
@@ -90,7 +89,7 @@ const LawInfoNew = ({ data, tel }) => {
90
89
  const convertFaqItemType = (template) => {
91
90
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
92
91
  if (faqElementMaxCountInContents >= 2) {
93
- template.description = template.description.replace(/itemtype\s*=\s*["']https:\/\/schema\.org\/FAQPage["']/gi, '');
92
+ template.description = template.description.replaceAll(/item(scope|type)\s*=\s*["'][^"']*["']/gi, '');
94
93
  return template;
95
94
  }
96
95
  return template;
@@ -123,7 +122,7 @@ const LawInfoNew = ({ data, tel }) => {
123
122
  </div>
124
123
  </div>
125
124
 
126
- <article itemScope={faqElementMaxCountInContents >= 2 ? true : undefined} itemType={faqElementMaxCountInContents >= 2
125
+ <article itemScope={faqElementMaxCountInContents >= 1 ? true : undefined} itemType={faqElementMaxCountInContents >= 1
127
126
  ? 'https://schema.org/FAQPage'
128
127
  : undefined}>
129
128
  {/*목차*/}
@@ -111,7 +111,6 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
111
111
  };
112
112
 
113
113
  const handleFaqItemScope = (isFaqActive: boolean, faqCount: number): true | undefined => {
114
- // isFaqActive가 true이거나 faqCount가 2 이상인 경우
115
114
  if (isFaqActive || faqCount >= 2) {
116
115
  return undefined;
117
116
  }
@@ -122,10 +121,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
122
121
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
123
122
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
124
123
  if ((faqElementMaxCountInContents as number) >= 2) {
125
- template.description = template.description.replace(
126
- /itemtype\s*=\s*["']https:\/\/schema\.org\/FAQPage["']/gi,
127
- ''
128
- );
124
+ template.description = template.description.replaceAll(/item(scope|type)\s*=\s*["'][^"']*["']/gi, '');
129
125
 
130
126
  return template;
131
127
  }
@@ -189,9 +185,9 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
189
185
  </div>
190
186
 
191
187
  <article
192
- itemScope={(faqElementMaxCountInContents as number) >= 2 ? true : undefined}
188
+ itemScope={(faqElementMaxCountInContents as number) >= 1 ? true : undefined}
193
189
  itemType={
194
- (faqElementMaxCountInContents as number) >= 2
190
+ (faqElementMaxCountInContents as number) >= 1
195
191
  ? 'https://schema.org/FAQPage'
196
192
  : undefined
197
193
  }