@daeryun/dr_components 1.0.17 → 1.0.19

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.
@@ -61,9 +61,8 @@ const FieldNew = ({ data, tel }) => {
61
61
  return true;
62
62
  };
63
63
  const convertFaqItemType = (template) => {
64
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
65
64
  if (faqElementMaxCountInContents >= 2) {
66
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
65
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
67
66
  template.description = template.description.replaceAll('<div itemscope="" itemtype="https://schema.org/FAQPage">', '<div>');
68
67
  return template;
69
68
  }
@@ -136,7 +135,7 @@ const FieldNew = ({ data, tel }) => {
136
135
  {h2List &&
137
136
  h2List.map((h2Template, index) => {
138
137
  return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
139
- <H2Contents h2Template={h2Template} index={index} faqCount={h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount}/>
138
+ <H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount}/>
140
139
  {/*h3*/}
141
140
  {template
142
141
  .filter(t => t.parent === h2Template.idx)
@@ -148,7 +147,7 @@ const FieldNew = ({ data, tel }) => {
148
147
  const news_length = newsLinkList.length;
149
148
  const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
150
149
  return (<>
151
- <H3Contents h3Template={h3Template} key={'h3영역' + h3Template.idx} faqCount={h3Template === null || h3Template === void 0 ? void 0 : h3Template.faqCount}/>
150
+ <H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={h3Template === null || h3Template === void 0 ? void 0 : h3Template.faqCount}/>
152
151
  {(refer_is_use &&
153
152
  refer_length > 0 &&
154
153
  refer_content_length > 0) ||
@@ -85,9 +85,8 @@ const FieldNew = ({ data, tel }: IFieldNewPageTypes) => {
85
85
  };
86
86
 
87
87
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
88
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
89
88
  if ((faqElementMaxCountInContents as number) >= 2) {
90
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
89
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
91
90
  template.description = template.description.replaceAll(
92
91
  '&lt;div itemscope="" itemtype="https://schema.org/FAQPage"&gt;',
93
92
  '&lt;div&gt;'
@@ -206,7 +205,7 @@ const FieldNew = ({ data, tel }: IFieldNewPageTypes) => {
206
205
  key={'h2영역' + h2Template.idx}
207
206
  >
208
207
  <H2Contents
209
- h2Template={h2Template}
208
+ h2Template={convertFaqItemType(h2Template)}
210
209
  index={index}
211
210
  faqCount={h2Template?.faqCount}
212
211
  />
@@ -229,7 +228,7 @@ const FieldNew = ({ data, tel }: IFieldNewPageTypes) => {
229
228
  return (
230
229
  <>
231
230
  <H3Contents
232
- h3Template={h3Template}
231
+ h3Template={convertFaqItemType(h3Template)}
233
232
  key={'h3영역' + h3Template.idx}
234
233
  faqCount={h3Template?.faqCount}
235
234
  />
@@ -63,9 +63,8 @@ const LawInfoNew = ({ data, tel }) => {
63
63
  return true;
64
64
  };
65
65
  const convertFaqItemType = (template) => {
66
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
67
66
  if (faqElementMaxCountInContents >= 2) {
68
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
67
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
69
68
  template.description = template.description.replaceAll('&lt;div itemscope="" itemtype="https://schema.org/FAQPage"&gt;', '&lt;div&gt;');
70
69
  return template;
71
70
  }
@@ -136,7 +135,6 @@ const LawInfoNew = ({ data, tel }) => {
136
135
  {/*h2*/}
137
136
  {h2List &&
138
137
  h2List.map((h2Template, index) => {
139
- console.log('h2Template.faqCount : ', h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount);
140
138
  return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
141
139
  <H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount}/>
142
140
 
@@ -93,9 +93,8 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
93
93
  };
94
94
 
95
95
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
96
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
97
96
  if ((faqElementMaxCountInContents as number) >= 2) {
98
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
97
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
99
98
  template.description = template.description.replaceAll(
100
99
  '&lt;div itemscope="" itemtype="https://schema.org/FAQPage"&gt;',
101
100
  '&lt;div&gt;'
@@ -196,14 +195,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
196
195
  </div>
197
196
  </div>
198
197
 
199
- <article
200
- // itemScope={(faqElementMaxCountInContents as number) >= 1 ? undefined : true}
201
- // itemType={
202
- // (faqElementMaxCountInContents as number) >= 1
203
- // ? undefined
204
- // : 'https://schema.org/FAQPage'
205
- // }
206
- >
198
+ <article>
207
199
  {/*목차*/}
208
200
  <ContentList
209
201
  template={template}
@@ -214,7 +206,6 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
214
206
  {/*h2*/}
215
207
  {h2List &&
216
208
  h2List.map((h2Template, index) => {
217
- console.log('h2Template.faqCount : ', h2Template?.faqCount);
218
209
  return (
219
210
  <section
220
211
  className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'}
@@ -8,6 +8,7 @@ import bg_mo from '../../../asset/images/strength/mo.webp';
8
8
  import arrow from '../../../asset/images/strength/arrow.webp';
9
9
  import arrow_red from '../../../asset/images/strength/red_arrow.webp';
10
10
  const StrengthIntro = ({ initialData }) => {
11
+ var _a;
11
12
  const { width } = useBrowser();
12
13
  const handleScroll = (index) => {
13
14
  const element = document.getElementById(`strength_${index}`);
@@ -133,7 +134,7 @@ const StrengthIntro = ({ initialData }) => {
133
134
  지난 7년간
134
135
  <br />
135
136
  <LgText className={'text-[2.1em] text-[#AB0634]'} isSmall>
136
- {initialData.experience_cnt.toLocaleString()}+
137
+ {(_a = initialData === null || initialData === void 0 ? void 0 : initialData.experience_cnt) === null || _a === void 0 ? void 0 : _a.toLocaleString()}+
137
138
  </LgText>{' '}
138
139
  </span>
139
140
  사건 수행 <span className={'text-[0.7em]'}>(*종결건수 기준)</span>
@@ -197,7 +197,7 @@ const StrengthIntro = ({ initialData }: { initialData: IInitialDataTypes }) => {
197
197
  지난 7년간
198
198
  <br />
199
199
  <LgText className={'text-[2.1em] text-[#AB0634]'} isSmall>
200
- {initialData.experience_cnt.toLocaleString()}+
200
+ {initialData?.experience_cnt?.toLocaleString()}+
201
201
  </LgText>{' '}
202
202
  </span>
203
203
  사건 수행 <span className={'text-[0.7em]'}>(*종결건수 기준)</span>
@@ -74,9 +74,8 @@ const SuccessNew = ({ data, tel }) => {
74
74
  return true;
75
75
  };
76
76
  const convertFaqItemType = (template) => {
77
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
78
77
  if (faqElementMaxCountInContents >= 2) {
79
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
78
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
80
79
  template.description = template.description.replaceAll('&lt;div itemscope="" itemtype="https://schema.org/FAQPage"&gt;', '&lt;div&gt;');
81
80
  return template;
82
81
  }
@@ -149,7 +148,7 @@ const SuccessNew = ({ data, tel }) => {
149
148
  {h2List &&
150
149
  h2List.map((h2Template, index) => {
151
150
  return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
152
- <H2Contents h2Template={h2Template} index={index} faqCount={h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount}/>
151
+ <H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={h2Template === null || h2Template === void 0 ? void 0 : h2Template.faqCount}/>
153
152
 
154
153
  {/*h3*/}
155
154
  {template
@@ -162,7 +161,7 @@ const SuccessNew = ({ data, tel }) => {
162
161
  const news_length = newsLinkList.length;
163
162
  const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
164
163
  return (<>
165
- <H3Contents h3Template={h3Template} key={'h3영역' + h3Template.idx} faqCount={h3Template === null || h3Template === void 0 ? void 0 : h3Template.faqCount}/>
164
+ <H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={h3Template === null || h3Template === void 0 ? void 0 : h3Template.faqCount}/>
166
165
  {(refer_is_use &&
167
166
  refer_length > 0 &&
168
167
  refer_content_length > 0) ||
@@ -110,9 +110,8 @@ const SuccessNew = ({ data, tel }: ISuccessNewPageTypes) => {
110
110
  };
111
111
 
112
112
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
113
- console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
114
113
  if ((faqElementMaxCountInContents as number) >= 2) {
115
- // 해당 게시글에 faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
114
+ // faqElementMaxCountInContents가 두 개 이상일 경우, template 내부에 FAQPage itemtype을 지운다. FAQPage 중복 이슈로 인한 코드임
116
115
  template.description = template.description.replaceAll(
117
116
  '&lt;div itemscope="" itemtype="https://schema.org/FAQPage"&gt;',
118
117
  '&lt;div&gt;'
@@ -230,7 +229,7 @@ const SuccessNew = ({ data, tel }: ISuccessNewPageTypes) => {
230
229
  key={'h2영역' + h2Template.idx}
231
230
  >
232
231
  <H2Contents
233
- h2Template={h2Template}
232
+ h2Template={convertFaqItemType(h2Template)}
234
233
  index={index}
235
234
  faqCount={h2Template?.faqCount}
236
235
  />
@@ -254,7 +253,7 @@ const SuccessNew = ({ data, tel }: ISuccessNewPageTypes) => {
254
253
  return (
255
254
  <>
256
255
  <H3Contents
257
- h3Template={h3Template}
256
+ h3Template={convertFaqItemType(h3Template)}
258
257
  key={'h3영역' + h3Template.idx}
259
258
  faqCount={h3Template?.faqCount}
260
259
  />
@@ -2,8 +2,6 @@ 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 active_faq :', active_faq);
6
- console.log('h2 faqCount :', faqCount);
7
5
  const getItemScope = () => {
8
6
  if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
9
7
  return true;
@@ -15,8 +15,6 @@ const H2Contents = ({
15
15
  faqCount?: number;
16
16
  }) => {
17
17
  const { active_faq } = h2Template;
18
- console.log('h2 active_faq :', active_faq);
19
- console.log('h2 faqCount :', faqCount);
20
18
 
21
19
  const getItemScope = (): boolean | undefined => {
22
20
  if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {
@@ -4,8 +4,6 @@ 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 active_faq :', active_faq);
8
- console.log('h3 faqCount :', faqCount);
9
7
  const getItemScope = () => {
10
8
  if (active_faq === false && (faqCount === 0 || faqCount === undefined)) {
11
9
  return true;
@@ -9,8 +9,6 @@ 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 active_faq :', active_faq);
13
- console.log('h3 faqCount :', faqCount);
14
12
 
15
13
  const getItemScope = (): boolean | undefined => {
16
14
  if (active_faq === false && ((faqCount as number) === 0 || faqCount === undefined)) {