@daeryun/dr_components 1.0.2 → 1.0.4

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.
@@ -88,7 +88,7 @@ const LawInfoNew = ({ data, tel }) => {
88
88
  };
89
89
  const convertFaqItemType = (template) => {
90
90
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
91
- if (faqElementMaxCountInContents >= 1) {
91
+ if (faqElementMaxCountInContents >= 2) {
92
92
  template.description = template.description.replaceAll(/<div\s+itemscope=""\s+itemtype="https:\/\/schema\.org\/FAQPage">/gi, '<div>');
93
93
  return template;
94
94
  }
@@ -122,9 +122,9 @@ const LawInfoNew = ({ data, tel }) => {
122
122
  </div>
123
123
  </div>
124
124
 
125
- <article itemScope={faqElementMaxCountInContents >= 1 ? true : undefined} itemType={faqElementMaxCountInContents >= 1
126
- ? 'https://schema.org/FAQPage'
127
- : undefined}>
125
+ <article itemScope={faqElementMaxCountInContents >= 1 ? undefined : true} itemType={faqElementMaxCountInContents >= 1
126
+ ? undefined
127
+ : 'https://schema.org/FAQPage'}>
128
128
  {/*목차*/}
129
129
  <ContentList template={template} h2List={h2List ? h2List : []} onScrollToElement={handleScrollToElement}/>
130
130
 
@@ -120,7 +120,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
120
120
 
121
121
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
122
122
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
123
- if ((faqElementMaxCountInContents as number) >= 1) {
123
+ if ((faqElementMaxCountInContents as number) >= 2) {
124
124
  template.description = template.description.replaceAll(
125
125
  /&lt;div\s+itemscope=""\s+itemtype="https:\/\/schema\.org\/FAQPage"&gt;/gi,
126
126
  '&lt;div&gt;'
@@ -188,11 +188,11 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
188
188
  </div>
189
189
 
190
190
  <article
191
- itemScope={(faqElementMaxCountInContents as number) >= 1 ? true : undefined}
191
+ itemScope={(faqElementMaxCountInContents as number) >= 1 ? undefined : true}
192
192
  itemType={
193
193
  (faqElementMaxCountInContents as number) >= 1
194
- ? 'https://schema.org/FAQPage'
195
- : undefined
194
+ ? undefined
195
+ : 'https://schema.org/FAQPage'
196
196
  }
197
197
  >
198
198
  {/*목차*/}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { htmlUrlDecode } from '../../../../lib';
3
3
  const H2Contents = ({ h2Template, index, faqCount }) => {
4
4
  const { active_faq } = h2Template;
5
+ console.log('h2 faqCount : , faqCount');
5
6
  const getItemScope = () => {
6
7
  if (active_faq || faqCount >= 1) {
7
8
  return undefined;
@@ -15,6 +15,7 @@ const H2Contents = ({
15
15
  faqCount?: number;
16
16
  }) => {
17
17
  const { active_faq } = h2Template;
18
+ console.log('h2 faqCount : , faqCount');
18
19
 
19
20
  const getItemScope = (): boolean | undefined => {
20
21
  if (active_faq || (faqCount as number) >= 1) {
@@ -4,6 +4,7 @@ import { htmlUrlDecode } from '../../../../lib';
4
4
  import FieldIcon from '../../../../asset/images/success_new/field_icon.webp';
5
5
  const H3Contents = ({ h3Template, faqCount }) => {
6
6
  const { active_faq } = h3Template;
7
+ console.log('h3 faqCount : , faqCount');
7
8
  const getItemScope = () => {
8
9
  if (active_faq || faqCount >= 1) {
9
10
  return undefined;
@@ -9,6 +9,7 @@ type ItemTypes = 'question' | 'answer';
9
9
 
10
10
  const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; faqCount?: number }) => {
11
11
  const { active_faq } = h3Template;
12
+ console.log('h3 faqCount : , faqCount');
12
13
 
13
14
  const getItemScope = (): boolean | undefined => {
14
15
  if (active_faq || (faqCount as number) >= 1) {