@daeryun/dr_components 0.7.96 → 0.7.97
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/asset/images/success_new/arrow.svg +13 -0
- package/dist/asset/images/success_new/arrow_full.webp +0 -0
- package/dist/asset/images/success_new/arrow_line.webp +0 -0
- package/dist/asset/images/success_new/dia_dot.svg +3 -0
- package/dist/asset/images/success_new/field_icon.webp +0 -0
- package/dist/asset/images/success_new/label.svg +10 -0
- package/dist/asset/images/success_new/left.webp +0 -0
- package/dist/asset/images/success_new/right.webp +0 -0
- package/dist/asset/images/success_new/right_arrow.svg +4 -0
- package/dist/asset/images/success_new/up_right.svg +3 -0
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/page/SuccessNew/SuccessNew.d.ts +3 -0
- package/dist/components/page/SuccessNew/SuccessNew.jsx +234 -0
- package/dist/components/page/SuccessNew/SuccessNew.tsx +430 -0
- package/dist/components/page/SuccessNew/SuccessNewType.d.ts +143 -0
- package/dist/components/page/SuccessNew/SuccessNewType.js +1 -0
- package/dist/components/page/SuccessNew/SuccessNewType.ts +155 -0
- package/dist/components/page/SuccessNew/components/ContentList.d.ts +9 -0
- package/dist/components/page/SuccessNew/components/ContentList.jsx +45 -0
- package/dist/components/page/SuccessNew/components/ContentList.tsx +124 -0
- package/dist/components/page/SuccessNew/components/FieldCase.d.ts +5 -0
- package/dist/components/page/SuccessNew/components/FieldCase.jsx +59 -0
- package/dist/components/page/SuccessNew/components/FieldCase.tsx +101 -0
- package/dist/components/page/SuccessNew/components/H2Contents.d.ts +7 -0
- package/dist/components/page/SuccessNew/components/H2Contents.jsx +19 -0
- package/dist/components/page/SuccessNew/components/H2Contents.tsx +49 -0
- package/dist/components/page/SuccessNew/components/H3Contents.d.ts +6 -0
- package/dist/components/page/SuccessNew/components/H3Contents.jsx +24 -0
- package/dist/components/page/SuccessNew/components/H3Contents.tsx +58 -0
- package/dist/components/page/SuccessNew/components/LawInfoContentList.d.ts +8 -0
- package/dist/components/page/SuccessNew/components/LawInfoContentList.jsx +77 -0
- package/dist/components/page/SuccessNew/components/LawInfoContentList.tsx +122 -0
- package/dist/components/page/SuccessNew/components/SeoAdditionalLink.d.ts +7 -0
- package/dist/components/page/SuccessNew/components/SeoAdditionalLink.jsx +80 -0
- package/dist/components/page/SuccessNew/components/SeoAdditionalLink.tsx +125 -0
- package/dist/components/page/SuccessNew/components/SuccessCase.d.ts +5 -0
- package/dist/components/page/SuccessNew/components/SuccessCase.jsx +64 -0
- package/dist/components/page/SuccessNew/components/SuccessCase.tsx +105 -0
- package/dist/styles/globals.css +524 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import ContentList from './components/ContentList';
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import useBrowser from '../../hook/useBrowser';
|
|
5
|
+
import { htmlUrlDecode } from '../../../lib';
|
|
6
|
+
import H2Contents from './components/H2Contents';
|
|
7
|
+
import H3Contents from './components/H3Contents';
|
|
8
|
+
import SeoAdditionalLink from './components/SeoAdditionalLink';
|
|
9
|
+
import PdfPrintCopyLink from '../../PdfPrintCopyLink/PdfPrintCopyLink';
|
|
10
|
+
import SeoYoutube from '../../Seo/SeoYoutube';
|
|
11
|
+
import Image from 'next/image';
|
|
12
|
+
import SeoStrength from '../../Seo/SeoStrength';
|
|
13
|
+
import SeoConsulting from '../../Seo/SeoConsulting';
|
|
14
|
+
import { Lawyer } from '../../Seo/Lawyer';
|
|
15
|
+
import LawInfoContentList from './components/LawInfoContentList';
|
|
16
|
+
import Link from 'next/link';
|
|
17
|
+
import Arrow from '../../../asset/images/success_new/left.webp';
|
|
18
|
+
import RightArrow from '../../../asset/images/success_new/right.webp';
|
|
19
|
+
import { SuccessCase } from './components/SuccessCase';
|
|
20
|
+
import { FieldCase } from './components/FieldCase';
|
|
21
|
+
const SuccessNew = ({ data, tel }) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const { template, contentsList, h2List, imgData, lawyerData, fieldData, successData, groupTopTenLawyerList, referenceLinkList, newsLinkList, shortsLinkList, youtubeLinkList, pn, initialData } = data;
|
|
24
|
+
const { width } = useBrowser(true);
|
|
25
|
+
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState(lawyerData);
|
|
26
|
+
const [isFaqActive, setIsFaqActive] = useState(false);
|
|
27
|
+
const printRef = useRef(null);
|
|
28
|
+
const typeIdxNum = template && template[0].type_idx;
|
|
29
|
+
const successDataFiltered = successData.filter(data => Number(data.type_idx) !== typeIdxNum);
|
|
30
|
+
const legalDocumentImageObject = imgData && imgData.length > 0 ? imgData[0] : null;
|
|
31
|
+
const h1Title = template
|
|
32
|
+
.map(temp => temp.tag === 'h1' && temp.tag_title)
|
|
33
|
+
.filter(temp => temp !== false)
|
|
34
|
+
.toString();
|
|
35
|
+
const h1Description = template
|
|
36
|
+
.map(temp => temp.tag === 'h1' && temp.description)
|
|
37
|
+
.filter(temp => temp !== false)
|
|
38
|
+
.toString();
|
|
39
|
+
//이미지 url
|
|
40
|
+
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
41
|
+
const handleScrollToElement = (idx) => {
|
|
42
|
+
if (typeof window != 'undefined') {
|
|
43
|
+
const element = document.getElementById(idx.toString());
|
|
44
|
+
if (element) {
|
|
45
|
+
const topOffset = element.getBoundingClientRect().top;
|
|
46
|
+
window.scrollTo({
|
|
47
|
+
top: window.scrollY + topOffset - 130,
|
|
48
|
+
behavior: 'smooth'
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const handleClickGoImg = () => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const imgLocation = (_b = (_a = document.getElementById('img_wrap')) === null || _a === void 0 ? void 0 : _a.offsetTop) !== null && _b !== void 0 ? _b : 0;
|
|
56
|
+
window.scrollTo({ top: imgLocation + (width > 680 ? 300 : 200), behavior: 'smooth' });
|
|
57
|
+
};
|
|
58
|
+
// 변호사 6명 맞추기
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const originLawyerLength = lawyerData.length;
|
|
61
|
+
const maxCount = 6; // 최대 변호사 수
|
|
62
|
+
const sliceCount = maxCount - originLawyerLength;
|
|
63
|
+
if (originLawyerLength < maxCount) {
|
|
64
|
+
// 중복되지 않은 변호사 리스트 생성
|
|
65
|
+
const additionalLawyers = groupTopTenLawyerList
|
|
66
|
+
.filter(topLawyer => !lawyerData.some(lawyer => lawyer.lawyer_name === topLawyer.lawyer_name))
|
|
67
|
+
.slice(0, sliceCount);
|
|
68
|
+
// 변호사 리스트 업데이트 (중복 방지)
|
|
69
|
+
setRelatedCaseLawyerList([...lawyerData, ...additionalLawyers]);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// 변호사 수가 충분하면 최대 6명만 설정
|
|
73
|
+
setRelatedCaseLawyerList(lawyerData.slice(0, maxCount));
|
|
74
|
+
}
|
|
75
|
+
}, [lawyerData, groupTopTenLawyerList]);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (template) {
|
|
78
|
+
// 초기화
|
|
79
|
+
setIsFaqActive(false);
|
|
80
|
+
for (const data of template) {
|
|
81
|
+
// console.log("faq 활성화: ", data['active_faq']);
|
|
82
|
+
if (data['active_faq']) {
|
|
83
|
+
setIsFaqActive(true);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, [template]);
|
|
88
|
+
return (<div itemScope={isFaqActive ? undefined : true} itemType={isFaqActive ? undefined : 'https://schema.org/FAQPage'} ref={printRef}>
|
|
89
|
+
<div className="relative m-auto mb-[100px] w-[90%] max-w-screen-2xl font-[SUIT] max-xs:mb-[30px]">
|
|
90
|
+
<div className={'m-auto mt-[100px] flex gap-[120px] ' +
|
|
91
|
+
//1500px
|
|
92
|
+
'max-3xl:gap-[80px] ' +
|
|
93
|
+
//1280px
|
|
94
|
+
'max-xl:mt-0 max-xl:flex-col max-xl:gap-0 ' +
|
|
95
|
+
//600px
|
|
96
|
+
'max-sm:mt-[10px] '}>
|
|
97
|
+
<div>
|
|
98
|
+
<div>
|
|
99
|
+
{template && width < 1280 ? (<PdfPrintCopyLink fileName={h1Title} printRef={printRef}/>) : null}
|
|
100
|
+
<div className={'max-xl:mt-[25px] max-xs:mt-[15px]'}>
|
|
101
|
+
{/* h1 제목 */}
|
|
102
|
+
<h1 className={' text-[52.5px] font-[800] tracking-[-2.1px] text-[#285FA7] max-3xl:text-5xl max-md:text-4xl max-xs:text-[28px]'} key={h1Title}>
|
|
103
|
+
{h1Title}
|
|
104
|
+
</h1>
|
|
105
|
+
|
|
106
|
+
{/* h1 설명글 */}
|
|
107
|
+
<div className={'mb-[54px] mt-[16px] text-[16px] font-normal tracking-[-0.96px] xs:text-[18px] sm:mb-[62px] sm:mt-[26px] sm:text-[20px] lg:mb-[75px] lg:mt-[37.5px] lg:text-[24px]'}>
|
|
108
|
+
<div id={'ck-content'} dangerouslySetInnerHTML={{
|
|
109
|
+
__html: htmlUrlDecode(h1Description.replace('../../UploadFile', '/SE2/upload'))
|
|
110
|
+
}}/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<article className={`w-full max-w-[1076px] overflow-hidden`}>
|
|
116
|
+
{/*목차*/}
|
|
117
|
+
<ContentList template={template} h2List={h2List ? h2List : []} onImageMove={handleClickGoImg} onScrollToElement={handleScrollToElement}/>
|
|
118
|
+
|
|
119
|
+
{/*h2*/}
|
|
120
|
+
{h2List &&
|
|
121
|
+
h2List.map((h2Template, index) => {
|
|
122
|
+
return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
|
|
123
|
+
<H2Contents h2Template={h2Template} index={index}/>
|
|
124
|
+
|
|
125
|
+
{/*h3*/}
|
|
126
|
+
{template
|
|
127
|
+
.filter(t => t.parent === h2Template.idx)
|
|
128
|
+
.map((h3Template, h3Index) => {
|
|
129
|
+
return (<H3Contents key={'h3영역 ' + h3Index} h3Template={h3Template}/>);
|
|
130
|
+
})}
|
|
131
|
+
<span className={'flex flex-col gap-[26px] ' +
|
|
132
|
+
//520px
|
|
133
|
+
'max-2sm:gap-[16px]'}>
|
|
134
|
+
{h2Template.reference_is_use && referenceLinkList.length > 0 && (<SeoAdditionalLink type={'참고'} linkList={referenceLinkList.filter(i => i.tag_idx === h2Template.idx)}/>)}
|
|
135
|
+
{h2Template.news_is_use && newsLinkList.length > 0 && (<SeoAdditionalLink type={'관련기사'} linkList={newsLinkList.filter(i => i.tag_idx === h2Template.idx)}/>)}
|
|
136
|
+
{h2Template.youtube_is_use && (<>
|
|
137
|
+
{shortsLinkList.length > 0 && (<SeoYoutube type={'shorts'} linkList={shortsLinkList.filter(i => i.tag_idx === h2Template.idx)}/>)}
|
|
138
|
+
{youtubeLinkList.length > 0 && (<SeoYoutube type={'youtube'} linkList={youtubeLinkList.filter(i => i.tag_idx === h2Template.idx)}/>)}
|
|
139
|
+
</>)}
|
|
140
|
+
</span>
|
|
141
|
+
</section>);
|
|
142
|
+
})}
|
|
143
|
+
{/*이미지------*/}
|
|
144
|
+
{imgData && imgData.length > 0 && (<section id={'img_wrap'} className={'relative flex min-h-[400px] items-center gap-[100px] px-[30px] xl:mb-[100px] ' +
|
|
145
|
+
'mt-[100px] justify-start 2xs:mb-[60px] ' +
|
|
146
|
+
//768px
|
|
147
|
+
'max-md:flex-col max-md:gap-[0px]'}>
|
|
148
|
+
{/*판결문이미지*/}
|
|
149
|
+
<div className={'h-fit w-[400px] border-[30px] border-solid border-[#e9e9e9] bg-[#e9e9e9] ' +
|
|
150
|
+
//1280px
|
|
151
|
+
'max-xl:w-[350px] max-xl:border-[25px] ' +
|
|
152
|
+
//480px
|
|
153
|
+
'max-sm:w-full max-sm:max-w-[350px]'}>
|
|
154
|
+
<Image src={imagePath + (legalDocumentImageObject === null || legalDocumentImageObject === void 0 ? void 0 : legalDocumentImageObject.img_url)} alt={(_a = legalDocumentImageObject === null || legalDocumentImageObject === void 0 ? void 0 : legalDocumentImageObject.alt) !== null && _a !== void 0 ? _a : ''} width={382} height={510} className={'h-auto w-full'} quality={100} draggable={false}/>
|
|
155
|
+
</div>
|
|
156
|
+
</section>)}
|
|
157
|
+
</article>
|
|
158
|
+
|
|
159
|
+
{width >= 1280 ? (<div className={'flex flex-col gap-[60px] lg:mt-[60px]'}>
|
|
160
|
+
<div className={'relative w-full '}>
|
|
161
|
+
<SeoStrength initialData={initialData}/>
|
|
162
|
+
</div>
|
|
163
|
+
<SeoConsulting tel={tel}/>
|
|
164
|
+
|
|
165
|
+
<LawInfoContentList contentsList={contentsList} template={template} className={''}/>
|
|
166
|
+
</div>) : (<></>)}
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
{(fieldData.length > 0 || relatedCaseLawyerList.length > 0 || successDataFiltered.length > 0) && (<span className={'relative mb-[30px] mt-[30px] w-[340px] shrink-0 ' +
|
|
170
|
+
//1500px
|
|
171
|
+
'max-3xl:mt-[10px] max-3xl:w-[300px] ' +
|
|
172
|
+
//1280px
|
|
173
|
+
'max-xl:mt-[50px] max-xl:w-full max-xl:pt-0'}>
|
|
174
|
+
<span id={'fixSideBar'} className={'top-[140px] flex w-[340px] flex-col gap-[50px] xl:sticky ' +
|
|
175
|
+
'max-3xl:w-[300px] max-xl:w-full'}>
|
|
176
|
+
{template && width >= 1280 ? (<PdfPrintCopyLink fileName={template.filter(t => t.tag === 'h1')[0].tag_title} printRef={printRef}/>) : null}
|
|
177
|
+
{successDataFiltered.length > 0 && <SuccessCase successData={successDataFiltered}/>}
|
|
178
|
+
{fieldData.length > 0 && <FieldCase fieldData={fieldData}/>}
|
|
179
|
+
{relatedCaseLawyerList.length > 0 && <Lawyer lawyerData={relatedCaseLawyerList}/>}
|
|
180
|
+
</span>
|
|
181
|
+
</span>)}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<div className="m-auto mt-[7em] max-w-screen-2xl max-md2:mt-[0] max-xs:mb-[30px] lg:mt-[5em] ">
|
|
186
|
+
{width < 1280 ? (<>
|
|
187
|
+
<div className="m-auto flex flex-col gap-[60px] max-4xl:w-[90%]">
|
|
188
|
+
<div className={'relative w-full '}>
|
|
189
|
+
<SeoStrength initialData={initialData}/>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<SeoConsulting tel={tel}/>
|
|
193
|
+
|
|
194
|
+
<LawInfoContentList contentsList={contentsList} template={template}/>
|
|
195
|
+
</div>
|
|
196
|
+
</>) : (<></>)}
|
|
197
|
+
{/* 이전글 다음글 */}
|
|
198
|
+
<div className="m-auto mt-[60px] max-4xl:w-[90%] max-md:mb-[30px]">
|
|
199
|
+
<div className={'flex flex-col items-start justify-between md:mb-[60px] lg:flex-row lg:items-center '}>
|
|
200
|
+
<div className={'mb-6 flex w-full flex-col gap-[8px] lg:mb-0 lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'}>
|
|
201
|
+
<Image src={Arrow} alt={'화살표'} title={'화살표'} width={15} height={15} className={'m-auto hidden lg:block'}/>
|
|
202
|
+
<p className={'shrink-0 text-[18px] text-[#285FA7] '}>이전글</p>
|
|
203
|
+
{pn.prev ? (<Link href={`${pn.prev.pathname}${pn.prev.id}`}>
|
|
204
|
+
<p className={'w-full truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '}>
|
|
205
|
+
{pn.prev.title}
|
|
206
|
+
</p>
|
|
207
|
+
</Link>) : (<p className={'truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '}>
|
|
208
|
+
이전글이 없습니다.
|
|
209
|
+
</p>)}
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<Link href={`/success`} className={'hidden shrink-0 lg:block'}>
|
|
213
|
+
<button className={'rounded-[30px] border-[1px] border-solid border-[#b0b0b0] bg-[#41464C] px-[40px] py-[10px] text-[#fff] xxl:px-[70px] xxl:py-[15px]'}>
|
|
214
|
+
목록보기
|
|
215
|
+
</button>
|
|
216
|
+
</Link>
|
|
217
|
+
|
|
218
|
+
<div className={'flex w-full flex-col justify-end gap-[8px] lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'}>
|
|
219
|
+
<p className={'shrink-0 text-[18px] text-[#285FA7]'}>다음글</p>
|
|
220
|
+
{pn.next ? (<Link href={`${pn.next.pathname}${pn.next.id}`}>
|
|
221
|
+
<p className={'w-full truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '}>
|
|
222
|
+
{pn.next.title}
|
|
223
|
+
</p>
|
|
224
|
+
</Link>) : (<p className={'truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em]'}>
|
|
225
|
+
다음글이 없습니다.
|
|
226
|
+
</p>)}
|
|
227
|
+
<Image src={RightArrow} alt={'화살표'} title={'화살표'} width={15} height={15} className={'m-auto hidden lg:block'}/>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>);
|
|
233
|
+
};
|
|
234
|
+
export default SuccessNew;
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import ContentList from './components/ContentList';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import useBrowser from '../../hook/useBrowser';
|
|
6
|
+
import { ILawyerTypes, ISuccessTypes, ILegalDocumentImageObjectTypes, ISuccessNewPageTypes } from './SuccessNewType';
|
|
7
|
+
import { htmlUrlDecode } from '../../../lib';
|
|
8
|
+
import H2Contents from './components/H2Contents';
|
|
9
|
+
import H3Contents from './components/H3Contents';
|
|
10
|
+
import SeoAdditionalLink from './components/SeoAdditionalLink';
|
|
11
|
+
import PdfPrintCopyLink from '../../PdfPrintCopyLink/PdfPrintCopyLink';
|
|
12
|
+
import SeoYoutube from '../../Seo/SeoYoutube';
|
|
13
|
+
import Image from 'next/image';
|
|
14
|
+
import SeoStrength from '../../Seo/SeoStrength';
|
|
15
|
+
import SeoConsulting from '../../Seo/SeoConsulting';
|
|
16
|
+
import { Lawyer } from '../../Seo/Lawyer';
|
|
17
|
+
import LawInfoContentList from './components/LawInfoContentList';
|
|
18
|
+
import Link from 'next/link';
|
|
19
|
+
import Arrow from '../../../asset/images/success_new/left.webp';
|
|
20
|
+
import RightArrow from '../../../asset/images/success_new/right.webp';
|
|
21
|
+
import { SuccessCase } from './components/SuccessCase';
|
|
22
|
+
import { FieldCase } from './components/FieldCase';
|
|
23
|
+
const SuccessNew = ({ data, tel }: ISuccessNewPageTypes) => {
|
|
24
|
+
const {
|
|
25
|
+
template,
|
|
26
|
+
contentsList,
|
|
27
|
+
h2List,
|
|
28
|
+
imgData,
|
|
29
|
+
lawyerData,
|
|
30
|
+
fieldData,
|
|
31
|
+
successData,
|
|
32
|
+
groupTopTenLawyerList,
|
|
33
|
+
referenceLinkList,
|
|
34
|
+
newsLinkList,
|
|
35
|
+
shortsLinkList,
|
|
36
|
+
youtubeLinkList,
|
|
37
|
+
pn,
|
|
38
|
+
initialData
|
|
39
|
+
} = data;
|
|
40
|
+
const { width } = useBrowser(true);
|
|
41
|
+
const [relatedCaseLawyerList, setRelatedCaseLawyerList] = useState<ILawyerTypes[]>(lawyerData);
|
|
42
|
+
const [isFaqActive, setIsFaqActive] = useState<boolean>(false);
|
|
43
|
+
const printRef = useRef<HTMLDivElement>(null);
|
|
44
|
+
const typeIdxNum: number | null = template && (template[0].type_idx as number);
|
|
45
|
+
const successDataFiltered: ISuccessTypes[] = successData.filter(data => Number(data.type_idx) !== typeIdxNum);
|
|
46
|
+
|
|
47
|
+
const legalDocumentImageObject: ILegalDocumentImageObjectTypes | null =
|
|
48
|
+
imgData && imgData.length > 0 ? (imgData[0] as ILegalDocumentImageObjectTypes) : null;
|
|
49
|
+
|
|
50
|
+
const h1Title: string = template
|
|
51
|
+
.map(temp => temp.tag === 'h1' && temp.tag_title)
|
|
52
|
+
.filter(temp => temp !== false)
|
|
53
|
+
.toString();
|
|
54
|
+
|
|
55
|
+
const h1Description: string = template
|
|
56
|
+
.map(temp => temp.tag === 'h1' && temp.description)
|
|
57
|
+
.filter(temp => temp !== false)
|
|
58
|
+
.toString();
|
|
59
|
+
|
|
60
|
+
//이미지 url
|
|
61
|
+
const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
62
|
+
|
|
63
|
+
const handleScrollToElement = (idx: number) => {
|
|
64
|
+
if (typeof window != 'undefined') {
|
|
65
|
+
const element = document.getElementById(idx.toString());
|
|
66
|
+
if (element) {
|
|
67
|
+
const topOffset = element.getBoundingClientRect().top;
|
|
68
|
+
window.scrollTo({
|
|
69
|
+
top: window.scrollY + topOffset - 130,
|
|
70
|
+
behavior: 'smooth'
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const handleClickGoImg = () => {
|
|
77
|
+
const imgLocation = document.getElementById('img_wrap')?.offsetTop ?? 0;
|
|
78
|
+
window.scrollTo({ top: imgLocation + (width > 680 ? 300 : 200), behavior: 'smooth' });
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// 변호사 6명 맞추기
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
const originLawyerLength = lawyerData.length;
|
|
84
|
+
const maxCount = 6; // 최대 변호사 수
|
|
85
|
+
const sliceCount = maxCount - originLawyerLength;
|
|
86
|
+
|
|
87
|
+
if (originLawyerLength < maxCount) {
|
|
88
|
+
// 중복되지 않은 변호사 리스트 생성
|
|
89
|
+
const additionalLawyers = groupTopTenLawyerList
|
|
90
|
+
.filter(topLawyer => !lawyerData.some(lawyer => lawyer.lawyer_name === topLawyer.lawyer_name))
|
|
91
|
+
.slice(0, sliceCount);
|
|
92
|
+
|
|
93
|
+
// 변호사 리스트 업데이트 (중복 방지)
|
|
94
|
+
setRelatedCaseLawyerList([...lawyerData, ...additionalLawyers]);
|
|
95
|
+
} else {
|
|
96
|
+
// 변호사 수가 충분하면 최대 6명만 설정
|
|
97
|
+
setRelatedCaseLawyerList(lawyerData.slice(0, maxCount));
|
|
98
|
+
}
|
|
99
|
+
}, [lawyerData, groupTopTenLawyerList]);
|
|
100
|
+
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (template) {
|
|
103
|
+
// 초기화
|
|
104
|
+
setIsFaqActive(false);
|
|
105
|
+
|
|
106
|
+
for (const data of template) {
|
|
107
|
+
// console.log("faq 활성화: ", data['active_faq']);
|
|
108
|
+
if (data['active_faq']) {
|
|
109
|
+
setIsFaqActive(true);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, [template]);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<div
|
|
117
|
+
itemScope={isFaqActive ? undefined : true}
|
|
118
|
+
itemType={isFaqActive ? undefined : 'https://schema.org/FAQPage'}
|
|
119
|
+
ref={printRef}
|
|
120
|
+
>
|
|
121
|
+
<div className="relative m-auto mb-[100px] w-[90%] max-w-screen-2xl font-[SUIT] max-xs:mb-[30px]">
|
|
122
|
+
<div
|
|
123
|
+
className={
|
|
124
|
+
'm-auto mt-[100px] flex gap-[120px] ' +
|
|
125
|
+
//1500px
|
|
126
|
+
'max-3xl:gap-[80px] ' +
|
|
127
|
+
//1280px
|
|
128
|
+
'max-xl:mt-0 max-xl:flex-col max-xl:gap-0 ' +
|
|
129
|
+
//600px
|
|
130
|
+
'max-sm:mt-[10px] '
|
|
131
|
+
}
|
|
132
|
+
>
|
|
133
|
+
<div>
|
|
134
|
+
<div>
|
|
135
|
+
{template && width < 1280 ? (
|
|
136
|
+
<PdfPrintCopyLink fileName={h1Title} printRef={printRef} />
|
|
137
|
+
) : null}
|
|
138
|
+
<div className={'max-xl:mt-[25px] max-xs:mt-[15px]'}>
|
|
139
|
+
{/* h1 제목 */}
|
|
140
|
+
<h1
|
|
141
|
+
className={
|
|
142
|
+
' text-[52.5px] font-[800] tracking-[-2.1px] text-[#285FA7] max-3xl:text-5xl max-md:text-4xl max-xs:text-[28px]'
|
|
143
|
+
}
|
|
144
|
+
key={h1Title}
|
|
145
|
+
>
|
|
146
|
+
{h1Title}
|
|
147
|
+
</h1>
|
|
148
|
+
|
|
149
|
+
{/* h1 설명글 */}
|
|
150
|
+
<div
|
|
151
|
+
className={
|
|
152
|
+
'mb-[54px] mt-[16px] text-[16px] font-normal tracking-[-0.96px] xs:text-[18px] sm:mb-[62px] sm:mt-[26px] sm:text-[20px] lg:mb-[75px] lg:mt-[37.5px] lg:text-[24px]'
|
|
153
|
+
}
|
|
154
|
+
>
|
|
155
|
+
<div
|
|
156
|
+
id={'ck-content'}
|
|
157
|
+
dangerouslySetInnerHTML={{
|
|
158
|
+
__html: htmlUrlDecode(
|
|
159
|
+
h1Description.replace('../../UploadFile', '/SE2/upload') as string
|
|
160
|
+
)
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<article className={`w-full max-w-[1076px] overflow-hidden`}>
|
|
168
|
+
{/*목차*/}
|
|
169
|
+
<ContentList
|
|
170
|
+
template={template}
|
|
171
|
+
h2List={h2List ? h2List : []}
|
|
172
|
+
onImageMove={handleClickGoImg}
|
|
173
|
+
onScrollToElement={handleScrollToElement}
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
{/*h2*/}
|
|
177
|
+
{h2List &&
|
|
178
|
+
h2List.map((h2Template, index) => {
|
|
179
|
+
return (
|
|
180
|
+
<section
|
|
181
|
+
className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'}
|
|
182
|
+
key={'h2영역' + h2Template.idx}
|
|
183
|
+
>
|
|
184
|
+
<H2Contents h2Template={h2Template} index={index} />
|
|
185
|
+
|
|
186
|
+
{/*h3*/}
|
|
187
|
+
{template
|
|
188
|
+
.filter(t => t.parent === h2Template.idx)
|
|
189
|
+
.map((h3Template, h3Index) => {
|
|
190
|
+
return (
|
|
191
|
+
<H3Contents key={'h3영역 ' + h3Index} h3Template={h3Template} />
|
|
192
|
+
);
|
|
193
|
+
})}
|
|
194
|
+
<span
|
|
195
|
+
className={
|
|
196
|
+
'flex flex-col gap-[26px] ' +
|
|
197
|
+
//520px
|
|
198
|
+
'max-2sm:gap-[16px]'
|
|
199
|
+
}
|
|
200
|
+
>
|
|
201
|
+
{h2Template.reference_is_use && referenceLinkList.length > 0 && (
|
|
202
|
+
<SeoAdditionalLink
|
|
203
|
+
type={'참고'}
|
|
204
|
+
linkList={referenceLinkList.filter(
|
|
205
|
+
i => i.tag_idx === h2Template.idx
|
|
206
|
+
)}
|
|
207
|
+
/>
|
|
208
|
+
)}
|
|
209
|
+
{h2Template.news_is_use && newsLinkList.length > 0 && (
|
|
210
|
+
<SeoAdditionalLink
|
|
211
|
+
type={'관련기사'}
|
|
212
|
+
linkList={newsLinkList.filter(
|
|
213
|
+
i => i.tag_idx === h2Template.idx
|
|
214
|
+
)}
|
|
215
|
+
/>
|
|
216
|
+
)}
|
|
217
|
+
{h2Template.youtube_is_use && (
|
|
218
|
+
<>
|
|
219
|
+
{shortsLinkList.length > 0 && (
|
|
220
|
+
<SeoYoutube
|
|
221
|
+
type={'shorts'}
|
|
222
|
+
linkList={shortsLinkList.filter(
|
|
223
|
+
i => i.tag_idx === h2Template.idx
|
|
224
|
+
)}
|
|
225
|
+
/>
|
|
226
|
+
)}
|
|
227
|
+
{youtubeLinkList.length > 0 && (
|
|
228
|
+
<SeoYoutube
|
|
229
|
+
type={'youtube'}
|
|
230
|
+
linkList={youtubeLinkList.filter(
|
|
231
|
+
i => i.tag_idx === h2Template.idx
|
|
232
|
+
)}
|
|
233
|
+
/>
|
|
234
|
+
)}
|
|
235
|
+
</>
|
|
236
|
+
)}
|
|
237
|
+
</span>
|
|
238
|
+
</section>
|
|
239
|
+
);
|
|
240
|
+
})}
|
|
241
|
+
{/*이미지------*/}
|
|
242
|
+
{imgData && imgData.length > 0 && (
|
|
243
|
+
<section
|
|
244
|
+
id={'img_wrap'}
|
|
245
|
+
className={
|
|
246
|
+
'relative flex min-h-[400px] items-center gap-[100px] px-[30px] xl:mb-[100px] ' +
|
|
247
|
+
'mt-[100px] justify-start 2xs:mb-[60px] ' +
|
|
248
|
+
//768px
|
|
249
|
+
'max-md:flex-col max-md:gap-[0px]'
|
|
250
|
+
}
|
|
251
|
+
>
|
|
252
|
+
{/*판결문이미지*/}
|
|
253
|
+
<div
|
|
254
|
+
className={
|
|
255
|
+
'h-fit w-[400px] border-[30px] border-solid border-[#e9e9e9] bg-[#e9e9e9] ' +
|
|
256
|
+
//1280px
|
|
257
|
+
'max-xl:w-[350px] max-xl:border-[25px] ' +
|
|
258
|
+
//480px
|
|
259
|
+
'max-sm:w-full max-sm:max-w-[350px]'
|
|
260
|
+
}
|
|
261
|
+
>
|
|
262
|
+
<Image
|
|
263
|
+
src={imagePath + legalDocumentImageObject?.img_url}
|
|
264
|
+
alt={legalDocumentImageObject?.alt ?? ''}
|
|
265
|
+
width={382}
|
|
266
|
+
height={510}
|
|
267
|
+
className={'h-auto w-full'}
|
|
268
|
+
quality={100}
|
|
269
|
+
draggable={false}
|
|
270
|
+
/>
|
|
271
|
+
</div>
|
|
272
|
+
</section>
|
|
273
|
+
)}
|
|
274
|
+
</article>
|
|
275
|
+
|
|
276
|
+
{width >= 1280 ? (
|
|
277
|
+
<div className={'flex flex-col gap-[60px] lg:mt-[60px]'}>
|
|
278
|
+
<div className={'relative w-full '}>
|
|
279
|
+
<SeoStrength initialData={initialData} />
|
|
280
|
+
</div>
|
|
281
|
+
<SeoConsulting tel={tel} />
|
|
282
|
+
|
|
283
|
+
<LawInfoContentList contentsList={contentsList} template={template} className={''} />
|
|
284
|
+
</div>
|
|
285
|
+
) : (
|
|
286
|
+
<></>
|
|
287
|
+
)}
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
{(fieldData.length > 0 || relatedCaseLawyerList.length > 0 || successDataFiltered.length > 0) && (
|
|
291
|
+
<span
|
|
292
|
+
className={
|
|
293
|
+
'relative mb-[30px] mt-[30px] w-[340px] shrink-0 ' +
|
|
294
|
+
//1500px
|
|
295
|
+
'max-3xl:mt-[10px] max-3xl:w-[300px] ' +
|
|
296
|
+
//1280px
|
|
297
|
+
'max-xl:mt-[50px] max-xl:w-full max-xl:pt-0'
|
|
298
|
+
}
|
|
299
|
+
>
|
|
300
|
+
<span
|
|
301
|
+
id={'fixSideBar'}
|
|
302
|
+
className={
|
|
303
|
+
'top-[140px] flex w-[340px] flex-col gap-[50px] xl:sticky ' +
|
|
304
|
+
'max-3xl:w-[300px] max-xl:w-full'
|
|
305
|
+
}
|
|
306
|
+
>
|
|
307
|
+
{template && width >= 1280 ? (
|
|
308
|
+
<PdfPrintCopyLink
|
|
309
|
+
fileName={template.filter(t => t.tag === 'h1')[0].tag_title}
|
|
310
|
+
printRef={printRef}
|
|
311
|
+
/>
|
|
312
|
+
) : null}
|
|
313
|
+
{successDataFiltered.length > 0 && <SuccessCase successData={successDataFiltered} />}
|
|
314
|
+
{fieldData.length > 0 && <FieldCase fieldData={fieldData} />}
|
|
315
|
+
{relatedCaseLawyerList.length > 0 && <Lawyer lawyerData={relatedCaseLawyerList} />}
|
|
316
|
+
</span>
|
|
317
|
+
</span>
|
|
318
|
+
)}
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div className="m-auto mt-[7em] max-w-screen-2xl max-md2:mt-[0] max-xs:mb-[30px] lg:mt-[5em] ">
|
|
323
|
+
{width < 1280 ? (
|
|
324
|
+
<>
|
|
325
|
+
<div className="m-auto flex flex-col gap-[60px] max-4xl:w-[90%]">
|
|
326
|
+
<div className={'relative w-full '}>
|
|
327
|
+
<SeoStrength initialData={initialData} />
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<SeoConsulting tel={tel} />
|
|
331
|
+
|
|
332
|
+
<LawInfoContentList contentsList={contentsList} template={template} />
|
|
333
|
+
</div>
|
|
334
|
+
</>
|
|
335
|
+
) : (
|
|
336
|
+
<></>
|
|
337
|
+
)}
|
|
338
|
+
{/* 이전글 다음글 */}
|
|
339
|
+
<div className="m-auto mt-[60px] max-4xl:w-[90%] max-md:mb-[30px]">
|
|
340
|
+
<div
|
|
341
|
+
className={
|
|
342
|
+
'flex flex-col items-start justify-between md:mb-[60px] lg:flex-row lg:items-center '
|
|
343
|
+
}
|
|
344
|
+
>
|
|
345
|
+
<div
|
|
346
|
+
className={
|
|
347
|
+
'mb-6 flex w-full flex-col gap-[8px] lg:mb-0 lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'
|
|
348
|
+
}
|
|
349
|
+
>
|
|
350
|
+
<Image
|
|
351
|
+
src={Arrow}
|
|
352
|
+
alt={'화살표'}
|
|
353
|
+
title={'화살표'}
|
|
354
|
+
width={15}
|
|
355
|
+
height={15}
|
|
356
|
+
className={'m-auto hidden lg:block'}
|
|
357
|
+
/>
|
|
358
|
+
<p className={'shrink-0 text-[18px] text-[#285FA7] '}>이전글</p>
|
|
359
|
+
{pn.prev ? (
|
|
360
|
+
<Link href={`${pn.prev.pathname}${pn.prev.id}`}>
|
|
361
|
+
<p
|
|
362
|
+
className={
|
|
363
|
+
'w-full truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '
|
|
364
|
+
}
|
|
365
|
+
>
|
|
366
|
+
{pn.prev.title}
|
|
367
|
+
</p>
|
|
368
|
+
</Link>
|
|
369
|
+
) : (
|
|
370
|
+
<p
|
|
371
|
+
className={
|
|
372
|
+
'truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '
|
|
373
|
+
}
|
|
374
|
+
>
|
|
375
|
+
이전글이 없습니다.
|
|
376
|
+
</p>
|
|
377
|
+
)}
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<Link href={`/success`} className={'hidden shrink-0 lg:block'}>
|
|
381
|
+
<button
|
|
382
|
+
className={
|
|
383
|
+
'rounded-[30px] border-[1px] border-solid border-[#b0b0b0] bg-[#41464C] px-[40px] py-[10px] text-[#fff] xxl:px-[70px] xxl:py-[15px]'
|
|
384
|
+
}
|
|
385
|
+
>
|
|
386
|
+
목록보기
|
|
387
|
+
</button>
|
|
388
|
+
</Link>
|
|
389
|
+
|
|
390
|
+
<div
|
|
391
|
+
className={
|
|
392
|
+
'flex w-full flex-col justify-end gap-[8px] lg:w-auto lg:flex-row lg:items-center lg:gap-[20px] lg2:gap-[28px]'
|
|
393
|
+
}
|
|
394
|
+
>
|
|
395
|
+
<p className={'shrink-0 text-[18px] text-[#285FA7]'}>다음글</p>
|
|
396
|
+
{pn.next ? (
|
|
397
|
+
<Link href={`${pn.next.pathname}${pn.next.id}`}>
|
|
398
|
+
<p
|
|
399
|
+
className={
|
|
400
|
+
'w-full truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em] '
|
|
401
|
+
}
|
|
402
|
+
>
|
|
403
|
+
{pn.next.title}
|
|
404
|
+
</p>
|
|
405
|
+
</Link>
|
|
406
|
+
) : (
|
|
407
|
+
<p
|
|
408
|
+
className={
|
|
409
|
+
'truncate text-[16px] xs:text-[18px] lg:w-[14em] lg2:w-[18em] xxl:w-[18em] xxl:text-[20px] 5xl:w-[20em]'
|
|
410
|
+
}
|
|
411
|
+
>
|
|
412
|
+
다음글이 없습니다.
|
|
413
|
+
</p>
|
|
414
|
+
)}
|
|
415
|
+
<Image
|
|
416
|
+
src={RightArrow}
|
|
417
|
+
alt={'화살표'}
|
|
418
|
+
title={'화살표'}
|
|
419
|
+
width={15}
|
|
420
|
+
height={15}
|
|
421
|
+
className={'m-auto hidden lg:block'}
|
|
422
|
+
/>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
);
|
|
429
|
+
};
|
|
430
|
+
export default SuccessNew;
|