@daeryun/dr_components 1.0.7 → 1.0.9
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.
- package/dist/components/Footer/FooterV2.jsx +1 -1
- package/dist/components/Footer/FooterV2.tsx +1 -1
- package/dist/components/Footer/_backup/index.jsx +1 -1
- package/dist/components/Footer/_backup/index.tsx +1 -1
- package/dist/components/Footer/index.jsx +1 -1
- package/dist/components/Footer/index.tsx +1 -1
- package/dist/components/page/LawInfoNew/LawInfoNew.jsx +20 -21
- package/dist/components/page/LawInfoNew/LawInfoNew.tsx +24 -37
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.d.ts +1 -1
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.ts +1 -1
- package/dist/components/page/SuccessNew/SuccessNewType.d.ts +0 -1
- package/dist/components/page/SuccessNew/SuccessNewType.ts +0 -1
- package/dist/components/page/SuccessNew/components/FieldCase.jsx +5 -2
- package/dist/components/page/SuccessNew/components/FieldCase.tsx +5 -2
- package/dist/components/page/SuccessNew/components/H2Contents.d.ts +1 -2
- package/dist/components/page/SuccessNew/components/H2Contents.jsx +6 -44
- package/dist/components/page/SuccessNew/components/H2Contents.tsx +12 -64
- package/dist/components/page/SuccessNew/components/H3Contents.d.ts +1 -2
- package/dist/components/page/SuccessNew/components/H3Contents.jsx +5 -43
- package/dist/components/page/SuccessNew/components/H3Contents.tsx +9 -57
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -235,7 +235,7 @@ const NewFooter = ({ groupsData, tel, logo, aceUrl, isBrochureBtn, isLogoLong, i
|
|
|
235
235
|
</p>
|
|
236
236
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
237
237
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
238
|
-
<span className={'inline-block'}
|
|
238
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
239
239
|
</p>
|
|
240
240
|
</div>
|
|
241
241
|
<p className={'mb-[54px] flex items-center text-[#666666] max-xl:justify-center max-md:text-[14px] max-xs:mb-[33px] max-xs:justify-start max-xs:text-[16px] max-2xs:mb-[18px] max-2xs:text-[14px] '}>
|
|
@@ -385,7 +385,7 @@ const NewFooter = ({
|
|
|
385
385
|
</p>
|
|
386
386
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
387
387
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
388
|
-
<span className={'inline-block'}
|
|
388
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
389
389
|
</p>
|
|
390
390
|
</div>
|
|
391
391
|
<p
|
|
@@ -235,7 +235,7 @@ const NewFooter = ({ groupsData, tel, logo, aceUrl, isBrochureBtn, isLogoLong, i
|
|
|
235
235
|
</p>
|
|
236
236
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
237
237
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
238
|
-
<span className={'inline-block'}
|
|
238
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
239
239
|
</p>
|
|
240
240
|
</div>
|
|
241
241
|
<p className={'mb-[54px] flex items-center text-[#666666] max-xl:justify-center max-md:text-[14px] max-xs:mb-[33px] max-xs:justify-start max-xs:text-[16px] max-2xs:mb-[18px] max-2xs:text-[14px] '}>
|
|
@@ -368,7 +368,7 @@ const NewFooter = ({
|
|
|
368
368
|
</p>
|
|
369
369
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
370
370
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
371
|
-
<span className={'inline-block'}
|
|
371
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
372
372
|
</p>
|
|
373
373
|
</div>
|
|
374
374
|
<p
|
|
@@ -231,7 +231,7 @@ const NewFooter = ({ groupsData, center_code, tel, logo, aceUrl, isBrochureBtn,
|
|
|
231
231
|
</p>
|
|
232
232
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
233
233
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
234
|
-
<span className={'inline-block'}
|
|
234
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
235
235
|
</p>
|
|
236
236
|
</div>
|
|
237
237
|
<p className={'mb-[54px] flex items-center text-[#666666] max-xl:justify-center max-md:text-[14px] max-xs:mb-[33px] max-xs:justify-start max-xs:text-[16px] max-2xs:mb-[18px] max-2xs:text-[14px] '}>
|
|
@@ -351,7 +351,7 @@ const NewFooter = ({
|
|
|
351
351
|
</p>
|
|
352
352
|
<p className={'break-keep xs:pl-[11px] xs:text-center'}>
|
|
353
353
|
<span className="font-[800]">광고책임변호사</span>{' '}
|
|
354
|
-
<span className={'inline-block'}
|
|
354
|
+
<span className={'inline-block'}>최이선, 손수연</span>
|
|
355
355
|
</p>
|
|
356
356
|
</div>
|
|
357
357
|
<p
|
|
@@ -19,7 +19,7 @@ import Image from 'next/image';
|
|
|
19
19
|
import Arrow from '../../../asset/images/success_new/left.webp';
|
|
20
20
|
import RightArrow from '../../../asset/images/success_new/right.webp';
|
|
21
21
|
const LawInfoNew = ({ data, tel }) => {
|
|
22
|
-
const { template, contentsList, h2List, lawyerData, fieldData, successData, groupTopTenLawyerList, referenceLinkList, newsLinkList, shortsLinkList, youtubeLinkList, initialData, nextPost, prevPost,
|
|
22
|
+
const { template, contentsList, h2List, lawyerData, fieldData, successData, groupTopTenLawyerList, referenceLinkList, newsLinkList, shortsLinkList, youtubeLinkList, initialData, nextPost, prevPost, faqCount } = data;
|
|
23
23
|
const { width } = useBrowser(true);
|
|
24
24
|
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState(lawyerData);
|
|
25
25
|
const [isFaqActive, setIsFaqActive] = useState(false);
|
|
@@ -74,29 +74,31 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}, [template]);
|
|
77
|
+
console.log('faqCount : ', faqCount);
|
|
77
78
|
const handleFaqItemType = (isFaqActive, faqCount) => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return 'https://schema.org/FAQPage';
|
|
82
|
-
};
|
|
83
|
-
const handleFaqItemScope = (isFaqActive, faqCount) => {
|
|
84
|
-
if (isFaqActive || faqCount >= 2) {
|
|
85
|
-
return undefined;
|
|
79
|
+
let isActive = faqCount >= 2 ? true : false;
|
|
80
|
+
if (isFaqActive || isActive) {
|
|
81
|
+
return 'https://schema.org/FAQPage';
|
|
86
82
|
}
|
|
87
|
-
return
|
|
83
|
+
return undefined;
|
|
88
84
|
};
|
|
89
85
|
const convertFaqItemType = (template) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
if (faqCount >= 2) {
|
|
87
|
+
template.description = template.description.replaceAll('itemtype="https://schema.org/FAQPage"', '');
|
|
88
|
+
console.log('변경된 template : ', template);
|
|
93
89
|
return template;
|
|
94
90
|
}
|
|
95
91
|
return template;
|
|
96
92
|
};
|
|
97
|
-
|
|
93
|
+
const checkFaqItemScope = (isFaqActive, faqCount) => {
|
|
94
|
+
if (isFaqActive || faqCount >= 2) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
return undefined;
|
|
98
|
+
};
|
|
99
|
+
return (<div itemScope={checkFaqItemScope(isFaqActive, faqCount)} itemType={handleFaqItemType(isFaqActive, faqCount)} ref={printRef}>
|
|
98
100
|
<div id={'sub_contents'}>
|
|
99
|
-
<div className="relative m-auto mb-[60px] w-[90%] max-w-screen-2xl
|
|
101
|
+
<div className="font-[SUIT]] relative m-auto mb-[60px] w-[90%] max-w-screen-2xl max-xs:mb-[30px]">
|
|
100
102
|
<div className={'m-auto mt-[100px] flex gap-[120px] lg:mt-[5em] ' +
|
|
101
103
|
//1700px
|
|
102
104
|
'max-5xl:gap-[80px] ' +
|
|
@@ -122,18 +124,15 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
122
124
|
</div>
|
|
123
125
|
</div>
|
|
124
126
|
|
|
125
|
-
<article
|
|
126
|
-
? undefined
|
|
127
|
-
: 'https://schema.org/FAQPage'}>
|
|
127
|
+
<article>
|
|
128
128
|
{/*목차*/}
|
|
129
129
|
<ContentList template={template} h2List={h2List ? h2List : []} onScrollToElement={handleScrollToElement}/>
|
|
130
130
|
|
|
131
131
|
{/*h2*/}
|
|
132
132
|
{h2List &&
|
|
133
133
|
h2List.map((h2Template, index) => {
|
|
134
|
-
console.log('h2Template.faqCount : ', h2Template.faqCount);
|
|
135
134
|
return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
|
|
136
|
-
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index}
|
|
135
|
+
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index}/>
|
|
137
136
|
|
|
138
137
|
{/*h3*/}
|
|
139
138
|
{template
|
|
@@ -146,7 +145,7 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
146
145
|
const news_length = newsLinkList.length;
|
|
147
146
|
const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
|
|
148
147
|
return (<>
|
|
149
|
-
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx}
|
|
148
|
+
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx}/>
|
|
150
149
|
{(refer_is_use &&
|
|
151
150
|
refer_length > 0 &&
|
|
152
151
|
refer_content_length > 0) ||
|
|
@@ -39,7 +39,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
39
39
|
initialData,
|
|
40
40
|
nextPost,
|
|
41
41
|
prevPost,
|
|
42
|
-
|
|
42
|
+
faqCount
|
|
43
43
|
} = data;
|
|
44
44
|
const { width } = useBrowser(true);
|
|
45
45
|
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState<ILawyerTypes[]>(lawyerData);
|
|
@@ -102,44 +102,44 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
102
102
|
}
|
|
103
103
|
}, [template]);
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
console.log('faqCount : ', faqCount);
|
|
106
|
+
|
|
107
|
+
const handleFaqItemType = (isFaqActive: boolean, faqCount: number) => {
|
|
108
|
+
let isActive = faqCount >= 2 ? true : false;
|
|
109
|
+
|
|
110
|
+
if (isFaqActive || isActive) {
|
|
111
|
+
return 'https://schema.org/FAQPage';
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
return
|
|
114
|
+
return undefined;
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
|
|
117
|
+
const convertFaqItemType = (template: ISeoTemplateTypes) => {
|
|
118
|
+
if (faqCount as number >= 2) {
|
|
119
|
+
template.description = template.description.replaceAll('itemtype="https://schema.org/FAQPage"', '');
|
|
120
|
+
console.log('변경된 template : ', template);
|
|
121
|
+
return template;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
|
-
return
|
|
124
|
+
return template;
|
|
119
125
|
};
|
|
120
126
|
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
template.description = template.description.replaceAll(
|
|
125
|
-
/<div\s+itemscope=""\s+itemtype="https:\/\/schema\.org\/FAQPage">/gi,
|
|
126
|
-
'<div>'
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
return template;
|
|
127
|
+
const checkFaqItemScope = (isFaqActive: boolean, faqCount: number) => {
|
|
128
|
+
if (isFaqActive || faqCount as number >= 2) {
|
|
129
|
+
return true;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
return
|
|
132
|
+
return undefined;
|
|
133
133
|
};
|
|
134
134
|
|
|
135
135
|
return (
|
|
136
136
|
<div
|
|
137
|
-
itemScope={
|
|
138
|
-
itemType={handleFaqItemType(isFaqActive,
|
|
137
|
+
itemScope={checkFaqItemScope(isFaqActive, faqCount as number)}
|
|
138
|
+
itemType={handleFaqItemType(isFaqActive, faqCount as number)}
|
|
139
139
|
ref={printRef}
|
|
140
140
|
>
|
|
141
141
|
<div id={'sub_contents'}>
|
|
142
|
-
<div className="relative m-auto mb-[60px] w-[90%] max-w-screen-2xl
|
|
142
|
+
<div className="font-[SUIT]] relative m-auto mb-[60px] w-[90%] max-w-screen-2xl max-xs:mb-[30px]">
|
|
143
143
|
<div
|
|
144
144
|
className={
|
|
145
145
|
'm-auto mt-[100px] flex gap-[120px] lg:mt-[5em] ' +
|
|
@@ -187,14 +187,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
|
-
<article
|
|
191
|
-
itemScope={(faqElementMaxCountInContents as number) >= 1 ? undefined : true}
|
|
192
|
-
itemType={
|
|
193
|
-
(faqElementMaxCountInContents as number) >= 1
|
|
194
|
-
? undefined
|
|
195
|
-
: 'https://schema.org/FAQPage'
|
|
196
|
-
}
|
|
197
|
-
>
|
|
190
|
+
<article>
|
|
198
191
|
{/*목차*/}
|
|
199
192
|
<ContentList
|
|
200
193
|
template={template}
|
|
@@ -205,17 +198,12 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
205
198
|
{/*h2*/}
|
|
206
199
|
{h2List &&
|
|
207
200
|
h2List.map((h2Template, index) => {
|
|
208
|
-
console.log('h2Template.faqCount : ', h2Template.faqCount);
|
|
209
201
|
return (
|
|
210
202
|
<section
|
|
211
203
|
className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'}
|
|
212
204
|
key={'h2영역' + h2Template.idx}
|
|
213
205
|
>
|
|
214
|
-
<H2Contents
|
|
215
|
-
h2Template={convertFaqItemType(h2Template)}
|
|
216
|
-
index={index}
|
|
217
|
-
faqCount={h2Template.faqCount as number}
|
|
218
|
-
/>
|
|
206
|
+
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index} />
|
|
219
207
|
|
|
220
208
|
{/*h3*/}
|
|
221
209
|
{template
|
|
@@ -238,7 +226,6 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
238
226
|
<H3Contents
|
|
239
227
|
h3Template={convertFaqItemType(h3Template)}
|
|
240
228
|
key={'h3영역' + h3Template.idx}
|
|
241
|
-
faqCount={h3Template.faqCount as number}
|
|
242
229
|
/>
|
|
243
230
|
{(refer_is_use &&
|
|
244
231
|
refer_length > 0 &&
|
|
@@ -4,7 +4,10 @@ import IconArrow from '../../../../asset/images/success_new/up_right.svg';
|
|
|
4
4
|
import IconDot from '../../../../asset/images/success_new/dia_dot.svg';
|
|
5
5
|
import IconRightArrow from '../../../../asset/images/success_new/right_arrow.svg';
|
|
6
6
|
export const FieldCase = ({ fieldData }) => {
|
|
7
|
-
|
|
7
|
+
var _a;
|
|
8
|
+
const SERVICE_DOMAIN = (_a = process.env.NEXT_PUBLIC_SERVICE_DOMAIN) !== null && _a !== void 0 ? _a : '';
|
|
9
|
+
const isDebt = String(SERVICE_DOMAIN).includes('debtcollection');
|
|
10
|
+
const viewMorePath = isDebt ? 'https://www.daeryunlaw-compensation.com/field/area' : '/field/area';
|
|
8
11
|
return (<div className={'relative h-auto w-full border-l-[1px] border-t-[1px] border-solid border-[#B9B9B9] pb-[45px] pl-[26px] pt-[30px] ' +
|
|
9
12
|
'before:absolute before:left-0 before:top-0 before:block before:aspect-square before:w-[15px] before:bg-[#B9B9B9] before:content-[""] '}>
|
|
10
13
|
<span className={'flex h-fit w-full items-center justify-between'}>
|
|
@@ -15,7 +18,7 @@ export const FieldCase = ({ fieldData }) => {
|
|
|
15
18
|
'max-xl:text-[26px]'}>
|
|
16
19
|
관련 업무분야
|
|
17
20
|
</p>
|
|
18
|
-
<Link href={'
|
|
21
|
+
<Link href={viewMorePath} target={isDebt ? '_blank' : '_self'} className={'flex h-[35px] w-[100px] items-center justify-center gap-[4px] bg-[#5D5D5D] ' +
|
|
19
22
|
'hover:bg-[#722D6D] ' +
|
|
20
23
|
//1500px
|
|
21
24
|
'max-3xl:h-[30px] max-3xl:w-[90px] '} title={'업무분야 더보기'}>
|
|
@@ -6,7 +6,9 @@ import IconRightArrow from '../../../../asset/images/success_new/right_arrow.svg
|
|
|
6
6
|
import { IFieldTypes } from '../SuccessNewType';
|
|
7
7
|
|
|
8
8
|
export const FieldCase = ({ fieldData }: { fieldData: IFieldTypes[] }) => {
|
|
9
|
-
const SERVICE_DOMAIN = process.env.NEXT_PUBLIC_SERVICE_DOMAIN;
|
|
9
|
+
const SERVICE_DOMAIN = process.env.NEXT_PUBLIC_SERVICE_DOMAIN ?? '';
|
|
10
|
+
const isDebt = String(SERVICE_DOMAIN).includes('debtcollection');
|
|
11
|
+
const viewMorePath = isDebt ? 'https://www.daeryunlaw-compensation.com/field/area' : '/field/area';
|
|
10
12
|
|
|
11
13
|
return (
|
|
12
14
|
<div
|
|
@@ -28,7 +30,8 @@ export const FieldCase = ({ fieldData }: { fieldData: IFieldTypes[] }) => {
|
|
|
28
30
|
관련 업무분야
|
|
29
31
|
</p>
|
|
30
32
|
<Link
|
|
31
|
-
href={
|
|
33
|
+
href={viewMorePath}
|
|
34
|
+
target={isDebt ? '_blank' : '_self'}
|
|
32
35
|
className={
|
|
33
36
|
'flex h-[35px] w-[100px] items-center justify-center gap-[4px] bg-[#5D5D5D] ' +
|
|
34
37
|
'hover:bg-[#722D6D] ' +
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ISeoTemplateTypes } from '../SuccessNewType';
|
|
3
|
-
declare const H2Contents: ({ h2Template, index
|
|
3
|
+
declare const H2Contents: ({ h2Template, index }: {
|
|
4
4
|
h2Template: ISeoTemplateTypes;
|
|
5
5
|
index: number;
|
|
6
|
-
faqCount?: number;
|
|
7
6
|
}) => React.JSX.Element;
|
|
8
7
|
export default H2Contents;
|
|
@@ -1,55 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { htmlUrlDecode } from '../../../../lib';
|
|
3
|
-
const H2Contents = ({ h2Template, index
|
|
3
|
+
const H2Contents = ({ h2Template, index }) => {
|
|
4
4
|
const { active_faq } = h2Template;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const getItemScope = () => {
|
|
8
|
-
if (active_faq === false && faqCount === 0) {
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
return undefined;
|
|
12
|
-
};
|
|
13
|
-
const getItemProp = (category) => {
|
|
14
|
-
if (active_faq === false && faqCount === 0) {
|
|
15
|
-
switch (category) {
|
|
16
|
-
case 'mainEntity':
|
|
17
|
-
return 'mainEntity';
|
|
18
|
-
case 'acceptedAnswer':
|
|
19
|
-
return 'acceptedAnswer';
|
|
20
|
-
case 'name':
|
|
21
|
-
return 'name';
|
|
22
|
-
case 'text':
|
|
23
|
-
return 'text';
|
|
24
|
-
default:
|
|
25
|
-
undefined;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return undefined;
|
|
29
|
-
};
|
|
30
|
-
const getItemType = (category) => {
|
|
31
|
-
if (active_faq === false && faqCount === 0) {
|
|
32
|
-
switch (category) {
|
|
33
|
-
case 'question':
|
|
34
|
-
return 'https://schema.org/Question';
|
|
35
|
-
case 'answer':
|
|
36
|
-
return 'https://schema.org/Answer';
|
|
37
|
-
default:
|
|
38
|
-
undefined;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return undefined;
|
|
42
|
-
};
|
|
43
|
-
return (<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
|
|
44
|
-
<h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={getItemProp('name')}>
|
|
5
|
+
return (<div itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'mainEntity'} itemType={active_faq ? '' : 'https://schema.org/Question'}>
|
|
6
|
+
<h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={active_faq ? '' : 'name'}>
|
|
45
7
|
{index + 1}. {h2Template.tag_title}
|
|
46
8
|
</h2>
|
|
47
9
|
<div className={'px-[10px] sm:px-[18px]'}>
|
|
48
10
|
{/*h2 설명글*/}
|
|
49
|
-
<div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={
|
|
50
|
-
{h2Template.is_editor ? (<div itemProp={
|
|
11
|
+
<div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'acceptedAnswer'} itemType={active_faq ? '' : 'https://schema.org/Answer'}>
|
|
12
|
+
{h2Template.is_editor ? (<div itemProp={active_faq ? '' : 'text'} id={'ck-content'} dangerouslySetInnerHTML={{
|
|
51
13
|
__html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
52
|
-
}}/>) : (<div itemProp={
|
|
14
|
+
}}/>) : (<div itemProp={active_faq ? '' : 'text'}>{h2Template.description}</div>)}
|
|
53
15
|
</div>
|
|
54
16
|
</div>
|
|
55
17
|
</div>);
|
|
@@ -1,73 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ISeoTemplateTypes } from '../SuccessNewType';
|
|
3
3
|
import { htmlUrlDecode } from '../../../../lib';
|
|
4
|
-
|
|
5
|
-
type ItemPropTypes = 'mainEntity' | 'acceptedAnswer' | 'name' | 'text';
|
|
6
|
-
type ItemTypes = 'question' | 'answer';
|
|
7
|
-
|
|
8
|
-
const H2Contents = ({
|
|
9
|
-
h2Template,
|
|
10
|
-
index,
|
|
11
|
-
faqCount
|
|
12
|
-
}: {
|
|
13
|
-
h2Template: ISeoTemplateTypes;
|
|
14
|
-
index: number;
|
|
15
|
-
faqCount?: number;
|
|
16
|
-
}) => {
|
|
4
|
+
const H2Contents = ({ h2Template, index }: { h2Template: ISeoTemplateTypes; index: number }) => {
|
|
17
5
|
const { active_faq } = h2Template;
|
|
18
|
-
console.log('h2 active_faq :', active_faq);
|
|
19
|
-
console.log('h2 faqCount :', faqCount);
|
|
20
|
-
|
|
21
|
-
const getItemScope = (): boolean | undefined => {
|
|
22
|
-
if (active_faq === false && (faqCount as number) === 0) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return undefined;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const getItemProp = (category: ItemPropTypes): string | undefined => {
|
|
30
|
-
if (active_faq === false && (faqCount as number) === 0) {
|
|
31
|
-
switch (category) {
|
|
32
|
-
case 'mainEntity':
|
|
33
|
-
return 'mainEntity';
|
|
34
|
-
case 'acceptedAnswer':
|
|
35
|
-
return 'acceptedAnswer';
|
|
36
|
-
case 'name':
|
|
37
|
-
return 'name';
|
|
38
|
-
case 'text':
|
|
39
|
-
return 'text';
|
|
40
|
-
default:
|
|
41
|
-
undefined;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return undefined;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const getItemType = (category: ItemTypes): string | undefined => {
|
|
49
|
-
if (active_faq === false && (faqCount as number) === 0) {
|
|
50
|
-
switch (category) {
|
|
51
|
-
case 'question':
|
|
52
|
-
return 'https://schema.org/Question';
|
|
53
|
-
case 'answer':
|
|
54
|
-
return 'https://schema.org/Answer';
|
|
55
|
-
default:
|
|
56
|
-
undefined;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return undefined;
|
|
61
|
-
};
|
|
62
6
|
|
|
63
7
|
return (
|
|
64
|
-
<div
|
|
8
|
+
<div
|
|
9
|
+
itemScope={active_faq ? undefined : true}
|
|
10
|
+
itemProp={active_faq ? '' : 'mainEntity'}
|
|
11
|
+
itemType={active_faq ? '' : 'https://schema.org/Question'}
|
|
12
|
+
>
|
|
65
13
|
<h2
|
|
66
14
|
className={
|
|
67
15
|
'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'
|
|
68
16
|
}
|
|
69
17
|
id={h2Template.idx.toString()}
|
|
70
|
-
itemProp={
|
|
18
|
+
itemProp={active_faq ? '' : 'name'}
|
|
71
19
|
>
|
|
72
20
|
{index + 1}. {h2Template.tag_title}
|
|
73
21
|
</h2>
|
|
@@ -77,20 +25,20 @@ const H2Contents = ({
|
|
|
77
25
|
className={
|
|
78
26
|
'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'
|
|
79
27
|
}
|
|
80
|
-
itemScope={
|
|
81
|
-
itemProp={
|
|
82
|
-
itemType={
|
|
28
|
+
itemScope={active_faq ? undefined : true}
|
|
29
|
+
itemProp={active_faq ? '' : 'acceptedAnswer'}
|
|
30
|
+
itemType={active_faq ? '' : 'https://schema.org/Answer'}
|
|
83
31
|
>
|
|
84
32
|
{h2Template.is_editor ? (
|
|
85
33
|
<div
|
|
86
|
-
itemProp={
|
|
34
|
+
itemProp={active_faq ? '' : 'text'}
|
|
87
35
|
id={'ck-content'}
|
|
88
36
|
dangerouslySetInnerHTML={{
|
|
89
37
|
__html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
90
38
|
}}
|
|
91
39
|
/>
|
|
92
40
|
) : (
|
|
93
|
-
<div itemProp={
|
|
41
|
+
<div itemProp={active_faq ? '' : 'text'}>{h2Template.description}</div>
|
|
94
42
|
)}
|
|
95
43
|
</div>
|
|
96
44
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ISeoTemplateTypes } from '../SuccessNewType';
|
|
3
|
-
declare const H3Contents: ({ h3Template
|
|
3
|
+
declare const H3Contents: ({ h3Template }: {
|
|
4
4
|
h3Template: ISeoTemplateTypes;
|
|
5
|
-
faqCount?: number;
|
|
6
5
|
}) => React.JSX.Element;
|
|
7
6
|
export default H3Contents;
|
|
@@ -2,57 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import { htmlUrlDecode } from '../../../../lib';
|
|
4
4
|
import FieldIcon from '../../../../asset/images/success_new/field_icon.webp';
|
|
5
|
-
const H3Contents = ({ h3Template
|
|
5
|
+
const H3Contents = ({ h3Template }) => {
|
|
6
6
|
const { active_faq } = h3Template;
|
|
7
|
-
console.log('h3 active_faq :', active_faq);
|
|
8
|
-
console.log('h3 faqCount :', faqCount);
|
|
9
|
-
const getItemScope = () => {
|
|
10
|
-
if (active_faq === false && faqCount === 0) {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
return undefined;
|
|
14
|
-
};
|
|
15
|
-
const getItemProp = (category) => {
|
|
16
|
-
if (active_faq === false && faqCount === 0) {
|
|
17
|
-
switch (category) {
|
|
18
|
-
case 'mainEntity':
|
|
19
|
-
return 'mainEntity';
|
|
20
|
-
case 'acceptedAnswer':
|
|
21
|
-
return 'acceptedAnswer';
|
|
22
|
-
case 'name':
|
|
23
|
-
return 'name';
|
|
24
|
-
case 'text':
|
|
25
|
-
return 'text';
|
|
26
|
-
default:
|
|
27
|
-
undefined;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return undefined;
|
|
31
|
-
};
|
|
32
|
-
const getItemType = (category) => {
|
|
33
|
-
if (active_faq === false && faqCount === 0) {
|
|
34
|
-
switch (category) {
|
|
35
|
-
case 'question':
|
|
36
|
-
return 'https://schema.org/Question';
|
|
37
|
-
case 'answer':
|
|
38
|
-
return 'https://schema.org/Answer';
|
|
39
|
-
default:
|
|
40
|
-
undefined;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
};
|
|
45
7
|
return (<>
|
|
46
|
-
<div className={'px-[10px] sm:px-[18px]'} key={'h3영역' + h3Template.idx} itemScope={
|
|
8
|
+
<div className={'px-[10px] sm:px-[18px]'} key={'h3영역' + h3Template.idx} itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'mainEntity'} itemType={active_faq ? '' : 'https://schema.org/Question'}>
|
|
47
9
|
{/*h3*/}
|
|
48
|
-
<h3 className={'mb-[16px] flex items-center break-keep text-[18px] font-bold tracking-[-0.96px] text-[#285FA7] sm:mb-[18px] sm:text-[22px] lg:mb-[22.5px] lg:text-[24px]'} id={h3Template.idx.toString()} itemProp={
|
|
10
|
+
<h3 className={'mb-[16px] flex items-center break-keep text-[18px] font-bold tracking-[-0.96px] text-[#285FA7] sm:mb-[18px] sm:text-[22px] lg:mb-[22.5px] lg:text-[24px]'} id={h3Template.idx.toString()} itemProp={active_faq ? '' : 'name'}>
|
|
49
11
|
{/*모든 seo 체크로 변경*/}
|
|
50
12
|
<Image src={FieldIcon} alt={'h3 img'} width={27} height={26} className={'mr-[8px] h-auto max-sm:w-[22px]'}/>
|
|
51
13
|
{h3Template.tag_title}
|
|
52
14
|
</h3>
|
|
53
15
|
{/*h3 설명글*/}
|
|
54
|
-
<div itemScope={
|
|
55
|
-
<div className={'mb-[44px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:text-[17.25px] lg:mb-[78px]'} itemProp={
|
|
16
|
+
<div itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'acceptedAnswer'} itemType={active_faq ? '' : 'https://schema.org/Answer'}>
|
|
17
|
+
<div className={'mb-[44px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:text-[17.25px] lg:mb-[78px]'} itemProp={active_faq ? '' : 'text'} id={'ck-content'} dangerouslySetInnerHTML={{
|
|
56
18
|
__html: htmlUrlDecode(h3Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
57
19
|
}}></div>
|
|
58
20
|
</div>
|