@daeryun/dr_components 0.9.89 → 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 +6 -5
- package/dist/components/page/LawInfoNew/LawInfoNew.tsx +7 -6
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.d.ts +1 -1
- package/dist/components/page/LawInfoNew/LawInfoNewTypes.ts +1 -1
- 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] ' +
|
|
@@ -133,7 +134,7 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
133
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
|
|
134
135
|
? 'https://schema.org/FAQPage'
|
|
135
136
|
: undefined}>
|
|
136
|
-
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={
|
|
137
|
+
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={faqElementMaxCountInContents}/>
|
|
137
138
|
|
|
138
139
|
{/*h3*/}
|
|
139
140
|
{template
|
|
@@ -146,7 +147,7 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
146
147
|
const news_length = newsLinkList.length;
|
|
147
148
|
const news_content_length = newsLinkList.filter(i => i.tag_idx === h3Template.idx).length;
|
|
148
149
|
return (<>
|
|
149
|
-
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={
|
|
150
|
+
<H3Contents h3Template={convertFaqItemType(h3Template)} key={'h3영역' + h3Template.idx} faqCount={faqElementMaxCountInContents}/>
|
|
150
151
|
{(refer_is_use &&
|
|
151
152
|
refer_length > 0 &&
|
|
152
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'}>
|
|
@@ -213,7 +214,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
213
214
|
<H2Contents
|
|
214
215
|
h2Template={convertFaqItemType(h2Template)}
|
|
215
216
|
index={index}
|
|
216
|
-
faqCount={
|
|
217
|
+
faqCount={faqElementMaxCountInContents as number}
|
|
217
218
|
/>
|
|
218
219
|
|
|
219
220
|
{/*h3*/}
|
|
@@ -237,7 +238,7 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
237
238
|
<H3Contents
|
|
238
239
|
h3Template={convertFaqItemType(h3Template)}
|
|
239
240
|
key={'h3영역' + h3Template.idx}
|
|
240
|
-
faqCount={
|
|
241
|
+
faqCount={faqElementMaxCountInContents as number}
|
|
241
242
|
/>
|
|
242
243
|
{(refer_is_use &&
|
|
243
244
|
refer_length > 0 &&
|