@daeryun/dr_components 0.9.88 → 0.9.90
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/page/LawInfoNew/LawInfoNew.jsx +10 -6
- package/dist/components/page/LawInfoNew/LawInfoNew.tsx +14 -6
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.d.ts +1 -1
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.ts +1 -1
- package/dist/components/page/SuccessNew/components/H2Contents.jsx +8 -10
- package/dist/components/page/SuccessNew/components/H2Contents.tsx +28 -35
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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, faqElementMaxCountInContents } = data;
|
|
23
23
|
const { width } = useBrowser(true);
|
|
24
24
|
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState(lawyerData);
|
|
25
25
|
const [isFaqActive, setIsFaqActive] = useState(false);
|
|
@@ -88,13 +88,14 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
88
88
|
return true;
|
|
89
89
|
};
|
|
90
90
|
const convertFaqItemType = (template) => {
|
|
91
|
-
|
|
91
|
+
console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
|
|
92
|
+
if (faqElementMaxCountInContents >= 2) {
|
|
92
93
|
template.description = template.description.replace(/itemtype\s*=\s*["']https:\/\/schema\.org\/FAQPage["']/gi, '');
|
|
93
94
|
return template;
|
|
94
95
|
}
|
|
95
96
|
return template;
|
|
96
97
|
};
|
|
97
|
-
return (<div itemScope={handleFaqItemScope(isFaqActive,
|
|
98
|
+
return (<div itemScope={handleFaqItemScope(isFaqActive, faqElementMaxCountInContents)} itemType={handleFaqItemType(isFaqActive, faqElementMaxCountInContents)} ref={printRef}>
|
|
98
99
|
<div id={'sub_contents'}>
|
|
99
100
|
<div className="relative m-auto mb-[60px] w-[90%] max-w-screen-2xl font-[SUIT] max-xs:mb-[30px]">
|
|
100
101
|
<div className={'m-auto mt-[100px] flex gap-[120px] lg:mt-[5em] ' +
|
|
@@ -129,8 +130,11 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
129
130
|
{/*h2*/}
|
|
130
131
|
{h2List &&
|
|
131
132
|
h2List.map((h2Template, index) => {
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
console.log('h2Template.faqCount : ', h2Template.faqCount);
|
|
134
|
+
return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx} itemScope={h2Template.faqCount >= 2 ? true : undefined} itemType={h2Template.faqCount >= 2
|
|
135
|
+
? 'https://schema.org/FAQPage'
|
|
136
|
+
: undefined}>
|
|
137
|
+
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={faqElementMaxCountInContents}/>
|
|
134
138
|
|
|
135
139
|
{/*h3*/}
|
|
136
140
|
{template
|
|
@@ -143,7 +147,7 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
143
147
|
const news_length = newsLinkList.length;
|
|
144
148
|
const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
|
|
145
149
|
return (<>
|
|
146
|
-
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={
|
|
150
|
+
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={faqElementMaxCountInContents}/>
|
|
147
151
|
{(refer_is_use &&
|
|
148
152
|
refer_length > 0 &&
|
|
149
153
|
refer_content_length > 0) ||
|
|
@@ -39,7 +39,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
39
39
|
initialData,
|
|
40
40
|
nextPost,
|
|
41
41
|
prevPost,
|
|
42
|
-
|
|
42
|
+
faqElementMaxCountInContents
|
|
43
43
|
} = data;
|
|
44
44
|
const { width } = useBrowser(true);
|
|
45
45
|
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState<ILawyerTypes[]>(lawyerData);
|
|
@@ -120,7 +120,8 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
|
|
123
|
-
|
|
123
|
+
console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
|
|
124
|
+
if ((faqElementMaxCountInContents as number) >= 2) {
|
|
124
125
|
template.description = template.description.replace(
|
|
125
126
|
/itemtype\s*=\s*["']https:\/\/schema\.org\/FAQPage["']/gi,
|
|
126
127
|
''
|
|
@@ -134,8 +135,8 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
134
135
|
|
|
135
136
|
return (
|
|
136
137
|
<div
|
|
137
|
-
itemScope={handleFaqItemScope(isFaqActive,
|
|
138
|
-
itemType={handleFaqItemType(isFaqActive,
|
|
138
|
+
itemScope={handleFaqItemScope(isFaqActive, faqElementMaxCountInContents as number)}
|
|
139
|
+
itemType={handleFaqItemType(isFaqActive, faqElementMaxCountInContents as number)}
|
|
139
140
|
ref={printRef}
|
|
140
141
|
>
|
|
141
142
|
<div id={'sub_contents'}>
|
|
@@ -198,15 +199,22 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
198
199
|
{/*h2*/}
|
|
199
200
|
{h2List &&
|
|
200
201
|
h2List.map((h2Template, index) => {
|
|
202
|
+
console.log('h2Template.faqCount : ', h2Template.faqCount);
|
|
201
203
|
return (
|
|
202
204
|
<section
|
|
203
205
|
className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'}
|
|
204
206
|
key={'h2영역' + h2Template.idx}
|
|
207
|
+
itemScope={(h2Template.faqCount as number) >= 2 ? true : undefined}
|
|
208
|
+
itemType={
|
|
209
|
+
(h2Template.faqCount as number) >= 2
|
|
210
|
+
? 'https://schema.org/FAQPage'
|
|
211
|
+
: undefined
|
|
212
|
+
}
|
|
205
213
|
>
|
|
206
214
|
<H2Contents
|
|
207
215
|
h2Template={convertFaqItemType(h2Template)}
|
|
208
216
|
index={index}
|
|
209
|
-
faqCount={
|
|
217
|
+
faqCount={faqElementMaxCountInContents as number}
|
|
210
218
|
/>
|
|
211
219
|
|
|
212
220
|
{/*h3*/}
|
|
@@ -230,7 +238,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
230
238
|
<H3Contents
|
|
231
239
|
h3Template={convertFaqItemType(h3Template)}
|
|
232
240
|
key={'h3영역' + h3Template.idx}
|
|
233
|
-
faqCount={
|
|
241
|
+
faqCount={faqElementMaxCountInContents as number}
|
|
234
242
|
/>
|
|
235
243
|
{(refer_is_use &&
|
|
236
244
|
refer_length > 0 &&
|
|
@@ -38,18 +38,16 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
|
|
|
38
38
|
}
|
|
39
39
|
return undefined;
|
|
40
40
|
};
|
|
41
|
-
return (<div itemScope={
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{h2Template.is_editor ? (<div itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
|
|
41
|
+
return (<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
|
|
42
|
+
<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')}>
|
|
43
|
+
{index + 1}. {h2Template.tag_title}
|
|
44
|
+
</h2>
|
|
45
|
+
<div className={'px-[10px] sm:px-[18px]'}>
|
|
46
|
+
{/*h2 설명글*/}
|
|
47
|
+
<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={getItemScope()} itemProp={getItemProp('acceptedAnswer')} itemType={getItemType('answer')}>
|
|
48
|
+
{h2Template.is_editor ? (<div itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
|
|
50
49
|
__html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
51
50
|
}}/>) : (<div itemProp={getItemProp('text')}>{h2Template.description}</div>)}
|
|
52
|
-
</div>
|
|
53
51
|
</div>
|
|
54
52
|
</div>
|
|
55
53
|
</div>);
|
|
@@ -58,44 +58,37 @@ const H2Contents = ({
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
|
-
<div
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
|
|
62
|
+
<h2
|
|
63
|
+
className={
|
|
64
|
+
'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]'
|
|
65
|
+
}
|
|
66
|
+
id={h2Template.idx.toString()}
|
|
67
|
+
itemProp={getItemProp('name')}
|
|
68
|
+
>
|
|
69
|
+
{index + 1}. {h2Template.tag_title}
|
|
70
|
+
</h2>
|
|
71
|
+
<div className={'px-[10px] sm:px-[18px]'}>
|
|
72
|
+
{/*h2 설명글*/}
|
|
73
|
+
<div
|
|
67
74
|
className={
|
|
68
|
-
'
|
|
75
|
+
'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]'
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
itemProp={getItemProp('
|
|
77
|
+
itemScope={getItemScope()}
|
|
78
|
+
itemProp={getItemProp('acceptedAnswer')}
|
|
79
|
+
itemType={getItemType('answer')}
|
|
72
80
|
>
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
itemProp={getItemProp('
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
{h2Template.is_editor ? (
|
|
86
|
-
<div
|
|
87
|
-
itemProp={getItemProp('text')}
|
|
88
|
-
id={'ck-content'}
|
|
89
|
-
dangerouslySetInnerHTML={{
|
|
90
|
-
__html: htmlUrlDecode(
|
|
91
|
-
h2Template.description.replace('../../UploadFile', '/SE2/upload')
|
|
92
|
-
)
|
|
93
|
-
}}
|
|
94
|
-
/>
|
|
95
|
-
) : (
|
|
96
|
-
<div itemProp={getItemProp('text')}>{h2Template.description}</div>
|
|
97
|
-
)}
|
|
98
|
-
</div>
|
|
81
|
+
{h2Template.is_editor ? (
|
|
82
|
+
<div
|
|
83
|
+
itemProp={getItemProp('text')}
|
|
84
|
+
id={'ck-content'}
|
|
85
|
+
dangerouslySetInnerHTML={{
|
|
86
|
+
__html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
) : (
|
|
90
|
+
<div itemProp={getItemProp('text')}>{h2Template.description}</div>
|
|
91
|
+
)}
|
|
99
92
|
</div>
|
|
100
93
|
</div>
|
|
101
94
|
</div>
|