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