@daeryun/dr_components 0.5.30 → 0.5.33
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/LawyerDetail/LawyerDetail.d.ts +3 -1
- package/dist/components/page/LawyerDetail/LawyerDetail.jsx +28 -6
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +2 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +2 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.tsx +80 -6
- package/dist/components/page/LawyerDetail/component/BasicInfo.d.ts +2 -1
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +18 -8
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +24 -7
- package/dist/components/page/LawyerDetail/component/BasicInfoWrapper.d.ts +9 -0
- package/dist/components/page/LawyerDetail/component/BasicInfoWrapper.jsx +146 -0
- package/dist/components/page/LawyerDetail/component/BasicInfoWrapper.tsx +291 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ interface IDetailProps {
|
|
|
6
6
|
speciality: ILawyerCareer[];
|
|
7
7
|
certiList: ILawyerCerti[];
|
|
8
8
|
codeList: ICommonCode[];
|
|
9
|
+
centerCode: string;
|
|
10
|
+
isUseWrapper?: boolean;
|
|
9
11
|
}
|
|
10
|
-
declare const Detail: ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDetailProps) => React.JSX.Element | null;
|
|
12
|
+
declare const Detail: ({ lawyerInfo, careerList, certiList, codeList, speciality, centerCode, isUseWrapper }: IDetailProps) => React.JSX.Element | null;
|
|
11
13
|
export default Detail;
|
|
@@ -20,7 +20,8 @@ import MobileSpeciality from './component/MobileSpeciality';
|
|
|
20
20
|
import Introduce from './component/Introduce';
|
|
21
21
|
import MobileRelatedPage from './component/MobileRelatedPage';
|
|
22
22
|
import { bodyFetch, lawyerCode } from '../../../lib';
|
|
23
|
-
|
|
23
|
+
import { Wrapper } from '../../index';
|
|
24
|
+
const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality, centerCode, isUseWrapper }) => {
|
|
24
25
|
const searchParams = useSearchParams();
|
|
25
26
|
const targetRefs = {
|
|
26
27
|
career: useRef(null),
|
|
@@ -96,7 +97,7 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }) =>
|
|
|
96
97
|
setIntegrateSearch(integrate_search ? String(integrate_search) : '');
|
|
97
98
|
}, [searchParams]);
|
|
98
99
|
return lawyerInfo ? (<section id={'sub_contents'} className={'pt-[200px] max-lg:pt-[180px] max-md:pt-[120px] max-sm:pt-[68px]'}>
|
|
99
|
-
<BasicInfo codeList={codeList} lawyerInfo={lawyerInfo} integrateSearch={integrateSearch}/>
|
|
100
|
+
<BasicInfo centerCode={centerCode} codeList={codeList} lawyerInfo={lawyerInfo} integrateSearch={integrateSearch}/>
|
|
100
101
|
|
|
101
102
|
{/*변호사 설명*/}
|
|
102
103
|
<Introduce lawyerInfo={lawyerInfo} integrateSearch={integrateSearch}/>
|
|
@@ -106,8 +107,7 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }) =>
|
|
|
106
107
|
{/*모바일 전문분야*/}
|
|
107
108
|
<MobileSpeciality speciality={speciality} codeList={codeList} maxLines={maxLines} integrateSearch={integrateSearch}/>
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
<div className={'relative mx-auto w-[90%]'}>
|
|
110
|
+
{isUseWrapper ? (<Wrapper>
|
|
111
111
|
{/*모바일 업무사례, 언론보도, 후기*/}
|
|
112
112
|
<MobileRelatedPage lawyerInfo={lawyerInfo} successList={successList} broadcastList={broadcastList} reviewList={reviewList} isLawyer={isLawyer}/>
|
|
113
113
|
|
|
@@ -128,8 +128,30 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }) =>
|
|
|
128
128
|
</div>
|
|
129
129
|
</Link>
|
|
130
130
|
</div>
|
|
131
|
-
</
|
|
132
|
-
|
|
131
|
+
</Wrapper>) : (<section className={'mx-auto max-w-screen-2xl '}>
|
|
132
|
+
<div className={'relative mx-auto w-[90%]'}>
|
|
133
|
+
{/*모바일 업무사례, 언론보도, 후기*/}
|
|
134
|
+
<MobileRelatedPage lawyerInfo={lawyerInfo} successList={successList} broadcastList={broadcastList} reviewList={reviewList} isLawyer={isLawyer}/>
|
|
135
|
+
|
|
136
|
+
{/*모바일 상단 버튼*/}
|
|
137
|
+
<MobileTabButton targetRefs={targetRefs}/>
|
|
138
|
+
|
|
139
|
+
{/*pc 상단 버튼*/}
|
|
140
|
+
<PcTabButton targetTitleRefs={targetTitleRefs} targetRefs={targetRefs} careerList={careerList}/>
|
|
141
|
+
|
|
142
|
+
{/* 경력 리스트 */}
|
|
143
|
+
<CareerList integrateSearch={integrateSearch} successList={successList} broadcastList={broadcastList} reviewList={reviewList} careerList={careerList} lawyerInfo={lawyerInfo} speciality={speciality} codeList={codeList} certiList={certiList} targetRefs={targetRefs} targetTitleRefs={targetTitleRefs}/>
|
|
144
|
+
|
|
145
|
+
<div className={'m-auto mb-[100px] flex w-[90%] max-w-[1400px] justify-center sm:justify-end '}>
|
|
146
|
+
<Link href={'/lawyer' + queryStr}>
|
|
147
|
+
<div className={'flex w-[10em] items-center justify-between rounded-[34px] border-[1px] border-solid border-[#ddd] bg-[#113461] px-6 py-4 text-[20px] font-bold text-[#fff] sm:w-[232px] '}>
|
|
148
|
+
변호사 더보기
|
|
149
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/Arrow_Right_LG.svg'} alt={''} title={''} width={36} height={36} className={'h-[30px] w-auto'}/>
|
|
150
|
+
</div>
|
|
151
|
+
</Link>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</section>)}
|
|
133
155
|
</section>) : null;
|
|
134
156
|
};
|
|
135
157
|
export default Detail;
|
|
@@ -19,6 +19,7 @@ export const Example1 = {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
const lawyerData = {
|
|
22
|
+
centerCode: 'CT0001',
|
|
22
23
|
lawyerInfo: {
|
|
23
24
|
l_id: 'tmp_20230405030258',
|
|
24
25
|
l_name: '김국일',
|
|
@@ -2492,6 +2493,7 @@ const lawyerData = {
|
|
|
2492
2493
|
]
|
|
2493
2494
|
};
|
|
2494
2495
|
const lawyerData2 = {
|
|
2496
|
+
centerCode: 'CT0001',
|
|
2495
2497
|
lawyerInfo: {
|
|
2496
2498
|
l_id: 'tmp_20250305050552',
|
|
2497
2499
|
l_name: '송진성',
|
|
@@ -31,6 +31,7 @@ export const Example1: Story = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const lawyerData = {
|
|
34
|
+
centerCode: 'CT0001',
|
|
34
35
|
lawyerInfo: {
|
|
35
36
|
l_id: 'tmp_20230405030258',
|
|
36
37
|
l_name: '김국일',
|
|
@@ -2506,6 +2507,7 @@ const lawyerData = {
|
|
|
2506
2507
|
};
|
|
2507
2508
|
|
|
2508
2509
|
const lawyerData2 = {
|
|
2510
|
+
centerCode: 'CT0001',
|
|
2509
2511
|
lawyerInfo: {
|
|
2510
2512
|
l_id: 'tmp_20250305050552',
|
|
2511
2513
|
l_name: '송진성',
|
|
@@ -13,6 +13,7 @@ import MobileSpeciality from './component/MobileSpeciality';
|
|
|
13
13
|
import Introduce from './component/Introduce';
|
|
14
14
|
import MobileRelatedPage from './component/MobileRelatedPage';
|
|
15
15
|
import { bodyFetch, lawyerCode } from '../../../lib';
|
|
16
|
+
import { Wrapper } from '../../index';
|
|
16
17
|
|
|
17
18
|
interface IDetailProps {
|
|
18
19
|
lawyerInfo: ILawyer;
|
|
@@ -20,9 +21,19 @@ interface IDetailProps {
|
|
|
20
21
|
speciality: ILawyerCareer[];
|
|
21
22
|
certiList: ILawyerCerti[];
|
|
22
23
|
codeList: ICommonCode[];
|
|
24
|
+
centerCode: string;
|
|
25
|
+
isUseWrapper?: boolean;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
const Detail = ({
|
|
28
|
+
const Detail = ({
|
|
29
|
+
lawyerInfo,
|
|
30
|
+
careerList,
|
|
31
|
+
certiList,
|
|
32
|
+
codeList,
|
|
33
|
+
speciality,
|
|
34
|
+
centerCode,
|
|
35
|
+
isUseWrapper
|
|
36
|
+
}: IDetailProps) => {
|
|
26
37
|
const searchParams = useSearchParams();
|
|
27
38
|
const targetRefs = {
|
|
28
39
|
career: useRef(null),
|
|
@@ -111,7 +122,12 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDe
|
|
|
111
122
|
|
|
112
123
|
return lawyerInfo ? (
|
|
113
124
|
<section id={'sub_contents'} className={'pt-[200px] max-lg:pt-[180px] max-md:pt-[120px] max-sm:pt-[68px]'}>
|
|
114
|
-
<BasicInfo
|
|
125
|
+
<BasicInfo
|
|
126
|
+
centerCode={centerCode}
|
|
127
|
+
codeList={codeList}
|
|
128
|
+
lawyerInfo={lawyerInfo}
|
|
129
|
+
integrateSearch={integrateSearch}
|
|
130
|
+
/>
|
|
115
131
|
|
|
116
132
|
{/*변호사 설명*/}
|
|
117
133
|
<Introduce lawyerInfo={lawyerInfo} integrateSearch={integrateSearch} />
|
|
@@ -126,8 +142,8 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDe
|
|
|
126
142
|
integrateSearch={integrateSearch}
|
|
127
143
|
/>
|
|
128
144
|
|
|
129
|
-
|
|
130
|
-
<
|
|
145
|
+
{isUseWrapper ? (
|
|
146
|
+
<Wrapper>
|
|
131
147
|
{/*모바일 업무사례, 언론보도, 후기*/}
|
|
132
148
|
<MobileRelatedPage
|
|
133
149
|
lawyerInfo={lawyerInfo}
|
|
@@ -177,8 +193,66 @@ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDe
|
|
|
177
193
|
</div>
|
|
178
194
|
</Link>
|
|
179
195
|
</div>
|
|
180
|
-
</
|
|
181
|
-
|
|
196
|
+
</Wrapper>
|
|
197
|
+
) : (
|
|
198
|
+
<section className={'mx-auto max-w-screen-2xl '}>
|
|
199
|
+
<div className={'relative mx-auto w-[90%]'}>
|
|
200
|
+
{/*모바일 업무사례, 언론보도, 후기*/}
|
|
201
|
+
<MobileRelatedPage
|
|
202
|
+
lawyerInfo={lawyerInfo}
|
|
203
|
+
successList={successList}
|
|
204
|
+
broadcastList={broadcastList}
|
|
205
|
+
reviewList={reviewList}
|
|
206
|
+
isLawyer={isLawyer}
|
|
207
|
+
/>
|
|
208
|
+
|
|
209
|
+
{/*모바일 상단 버튼*/}
|
|
210
|
+
<MobileTabButton targetRefs={targetRefs} />
|
|
211
|
+
|
|
212
|
+
{/*pc 상단 버튼*/}
|
|
213
|
+
<PcTabButton
|
|
214
|
+
targetTitleRefs={targetTitleRefs}
|
|
215
|
+
targetRefs={targetRefs}
|
|
216
|
+
careerList={careerList}
|
|
217
|
+
/>
|
|
218
|
+
|
|
219
|
+
{/* 경력 리스트 */}
|
|
220
|
+
<CareerList
|
|
221
|
+
integrateSearch={integrateSearch}
|
|
222
|
+
successList={successList}
|
|
223
|
+
broadcastList={broadcastList}
|
|
224
|
+
reviewList={reviewList}
|
|
225
|
+
careerList={careerList}
|
|
226
|
+
lawyerInfo={lawyerInfo}
|
|
227
|
+
speciality={speciality}
|
|
228
|
+
codeList={codeList}
|
|
229
|
+
certiList={certiList}
|
|
230
|
+
targetRefs={targetRefs}
|
|
231
|
+
targetTitleRefs={targetTitleRefs}
|
|
232
|
+
/>
|
|
233
|
+
|
|
234
|
+
<div className={'m-auto mb-[100px] flex w-[90%] max-w-[1400px] justify-center sm:justify-end '}>
|
|
235
|
+
<Link href={'/lawyer' + queryStr}>
|
|
236
|
+
<div
|
|
237
|
+
className={
|
|
238
|
+
'flex w-[10em] items-center justify-between rounded-[34px] border-[1px] border-solid border-[#ddd] bg-[#113461] px-6 py-4 text-[20px] font-bold text-[#fff] sm:w-[232px] '
|
|
239
|
+
}
|
|
240
|
+
>
|
|
241
|
+
변호사 더보기
|
|
242
|
+
<Image
|
|
243
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/Arrow_Right_LG.svg'}
|
|
244
|
+
alt={''}
|
|
245
|
+
title={''}
|
|
246
|
+
width={36}
|
|
247
|
+
height={36}
|
|
248
|
+
className={'h-[30px] w-auto'}
|
|
249
|
+
/>
|
|
250
|
+
</div>
|
|
251
|
+
</Link>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</section>
|
|
255
|
+
)}
|
|
182
256
|
</section>
|
|
183
257
|
) : null;
|
|
184
258
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILawyer } from '../ILawyerDetailTypes';
|
|
3
|
-
declare const BasicInfo: ({ lawyerInfo, codeList, integrateSearch }: {
|
|
3
|
+
declare const BasicInfo: ({ lawyerInfo, codeList, centerCode, integrateSearch }: {
|
|
4
4
|
lawyerInfo: ILawyer;
|
|
5
5
|
codeList: any[];
|
|
6
6
|
integrateSearch: string;
|
|
7
|
+
centerCode: string;
|
|
7
8
|
}) => React.JSX.Element;
|
|
8
9
|
export default BasicInfo;
|
|
@@ -5,7 +5,8 @@ import { insert } from '../../../../lib/conversion';
|
|
|
5
5
|
import * as gtag from '../../../../lib/gtag';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
7
7
|
import { searchColorLawyerText } from '../../../common/integrate';
|
|
8
|
-
const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
8
|
+
const BasicInfo = ({ lawyerInfo, codeList, centerCode, integrateSearch }) => {
|
|
9
|
+
var _a, _b;
|
|
9
10
|
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
10
11
|
const lawyerImagePath = imagePath + '/upload/lawyer';
|
|
11
12
|
const [isMobile, setIsMobile] = useState(false);
|
|
@@ -32,7 +33,10 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
32
33
|
setIsMobile(is_mobile);
|
|
33
34
|
}, []);
|
|
34
35
|
useEffect(() => {
|
|
35
|
-
|
|
36
|
+
var _a;
|
|
37
|
+
const data = ((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
|
|
38
|
+
? lawyerInfo.careers_summary
|
|
39
|
+
: lawyerInfo.l_ability;
|
|
36
40
|
if (data) {
|
|
37
41
|
const flag1 = data.length > 30;
|
|
38
42
|
const flag2 = (data === null || data === void 0 ? void 0 : data.split('\n').length) > 1 && (data === null || data === void 0 ? void 0 : data.split('\n')[0].length) > 14;
|
|
@@ -61,12 +65,12 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
61
65
|
<span className={'mb-1 block text-[70px] font-[800] leading-[1.14] tracking-[-0.9px] max-xl:text-[64px] max-lg:text-[60px] max-md2:mb-0 max-md2:text-[54px] max-xs:text-[40px] '}>
|
|
62
66
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
63
67
|
</span>
|
|
64
|
-
{lawyerInfo.l_position
|
|
68
|
+
{lawyerInfo.l_position ? (<span className={'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
|
|
65
69
|
'max-xl:text-[26px] ' +
|
|
66
70
|
'max-lg:text-[24px] ' +
|
|
67
71
|
'max-md2:text-[22px] '}>
|
|
68
72
|
|
|
69
|
-
{lawyerInfo.
|
|
73
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
70
74
|
</span>) : (<></>)}
|
|
71
75
|
</p>
|
|
72
76
|
{/*lawyer_code, l_ability, tel pc*/}
|
|
@@ -86,7 +90,9 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
86
90
|
</p>
|
|
87
91
|
<h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
|
|
88
92
|
'relative w-full font-[500]'}>
|
|
89
|
-
{searchColorLawyerText(lawyerInfo.
|
|
93
|
+
{searchColorLawyerText(((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
|
|
94
|
+
? lawyerInfo.careers_summary
|
|
95
|
+
: lawyerInfo.l_ability, integrateSearch)}
|
|
90
96
|
|
|
91
97
|
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
92
98
|
</h2>
|
|
@@ -107,9 +113,9 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
107
113
|
<span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
|
|
108
114
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
109
115
|
</span>
|
|
110
|
-
{lawyerInfo.l_position
|
|
116
|
+
{lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
|
|
111
117
|
|
|
112
|
-
{lawyerInfo.
|
|
118
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
113
119
|
</span>) : (<></>)}
|
|
114
120
|
</p>
|
|
115
121
|
|
|
@@ -118,7 +124,11 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
118
124
|
<p className={'font-[800]'}>
|
|
119
125
|
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
120
126
|
</p>
|
|
121
|
-
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
127
|
+
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
128
|
+
{searchColorLawyerText(((_b = lawyerInfo.l_sort_center) === null || _b === void 0 ? void 0 : _b.includes(centerCode)) && lawyerInfo.careers_summary
|
|
129
|
+
? lawyerInfo.careers_summary
|
|
130
|
+
: lawyerInfo.l_ability, integrateSearch)}
|
|
131
|
+
</p>
|
|
122
132
|
<p className={'flex items-center gap-2'}>
|
|
123
133
|
{lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} className={'text-[16px] '} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
|
|
124
134
|
T.{' '}
|
|
@@ -10,11 +10,13 @@ import { searchColorLawyerText } from '../../../common/integrate';
|
|
|
10
10
|
const BasicInfo = ({
|
|
11
11
|
lawyerInfo,
|
|
12
12
|
codeList,
|
|
13
|
+
centerCode,
|
|
13
14
|
integrateSearch
|
|
14
15
|
}: {
|
|
15
16
|
lawyerInfo: ILawyer;
|
|
16
17
|
codeList: any[];
|
|
17
18
|
integrateSearch: string;
|
|
19
|
+
centerCode: string;
|
|
18
20
|
}) => {
|
|
19
21
|
const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
20
22
|
const lawyerImagePath: string = imagePath + '/upload/lawyer';
|
|
@@ -46,7 +48,10 @@ const BasicInfo = ({
|
|
|
46
48
|
}, []);
|
|
47
49
|
|
|
48
50
|
useEffect(() => {
|
|
49
|
-
const data =
|
|
51
|
+
const data =
|
|
52
|
+
lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
|
|
53
|
+
? lawyerInfo.careers_summary
|
|
54
|
+
: lawyerInfo.l_ability;
|
|
50
55
|
if (data) {
|
|
51
56
|
const flag1: boolean = data.length > 30;
|
|
52
57
|
const flag2: boolean = data?.split('\n').length > 1 && data?.split('\n')[0].length > 14;
|
|
@@ -113,7 +118,7 @@ const BasicInfo = ({
|
|
|
113
118
|
>
|
|
114
119
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
115
120
|
</span>
|
|
116
|
-
{lawyerInfo.l_position
|
|
121
|
+
{lawyerInfo.l_position ? (
|
|
117
122
|
<span
|
|
118
123
|
className={
|
|
119
124
|
'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
|
|
@@ -123,7 +128,7 @@ const BasicInfo = ({
|
|
|
123
128
|
}
|
|
124
129
|
>
|
|
125
130
|
|
|
126
|
-
{lawyerInfo.
|
|
131
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
127
132
|
</span>
|
|
128
133
|
) : (
|
|
129
134
|
<></>
|
|
@@ -161,7 +166,12 @@ const BasicInfo = ({
|
|
|
161
166
|
'relative w-full font-[500]'
|
|
162
167
|
}
|
|
163
168
|
>
|
|
164
|
-
{searchColorLawyerText(
|
|
169
|
+
{searchColorLawyerText(
|
|
170
|
+
lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
|
|
171
|
+
? lawyerInfo.careers_summary
|
|
172
|
+
: lawyerInfo.l_ability,
|
|
173
|
+
integrateSearch
|
|
174
|
+
)}
|
|
165
175
|
|
|
166
176
|
<span
|
|
167
177
|
className={
|
|
@@ -211,10 +221,10 @@ const BasicInfo = ({
|
|
|
211
221
|
>
|
|
212
222
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
213
223
|
</span>
|
|
214
|
-
{lawyerInfo.l_position
|
|
224
|
+
{lawyerInfo.l_position ? (
|
|
215
225
|
<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
|
|
216
226
|
|
|
217
|
-
{lawyerInfo.
|
|
227
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
218
228
|
</span>
|
|
219
229
|
) : (
|
|
220
230
|
<></>
|
|
@@ -233,7 +243,14 @@ const BasicInfo = ({
|
|
|
233
243
|
integrateSearch
|
|
234
244
|
)}
|
|
235
245
|
</p>
|
|
236
|
-
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
246
|
+
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
247
|
+
{searchColorLawyerText(
|
|
248
|
+
lawyerInfo.l_sort_center?.includes(centerCode) && lawyerInfo.careers_summary
|
|
249
|
+
? lawyerInfo.careers_summary
|
|
250
|
+
: lawyerInfo.l_ability,
|
|
251
|
+
integrateSearch
|
|
252
|
+
)}
|
|
253
|
+
</p>
|
|
237
254
|
<p className={'flex items-center gap-2'}>
|
|
238
255
|
{lawyerInfo.l_tel && (
|
|
239
256
|
<Link
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ILawyer } from '../ILawyerDetailTypes';
|
|
3
|
+
declare const BasicInfoWrapper: ({ lawyerInfo, codeList, centerCode, integrateSearch }: {
|
|
4
|
+
lawyerInfo: ILawyer;
|
|
5
|
+
codeList: any[];
|
|
6
|
+
integrateSearch: string;
|
|
7
|
+
centerCode: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default BasicInfoWrapper;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import Image from 'next/image';
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { insert } from '../../../../lib/conversion';
|
|
5
|
+
import * as gtag from '../../../../lib/gtag';
|
|
6
|
+
import mobile from 'is-mobile';
|
|
7
|
+
import { searchColorLawyerText } from '../../../common/integrate';
|
|
8
|
+
const BasicInfoWrapper = ({ lawyerInfo, codeList, centerCode, integrateSearch }) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
11
|
+
const lawyerImagePath = imagePath + '/upload/lawyer';
|
|
12
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
13
|
+
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
14
|
+
const [cssFlag, setCssFlag] = useState(false);
|
|
15
|
+
const handleOnClickLawyerTel = () => {
|
|
16
|
+
if (isMobile) {
|
|
17
|
+
insert('lawyer_tel', isMobile);
|
|
18
|
+
gtag.event({
|
|
19
|
+
action: 'lawyer_tel',
|
|
20
|
+
category: 'tel',
|
|
21
|
+
label: '변호사 전화버튼',
|
|
22
|
+
value: '1'
|
|
23
|
+
});
|
|
24
|
+
try {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
AM_PL('/lawyer_tel');
|
|
27
|
+
}
|
|
28
|
+
catch (e) { }
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const is_mobile = mobile();
|
|
33
|
+
setIsMobile(is_mobile);
|
|
34
|
+
}, []);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
const data = ((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
|
|
38
|
+
? lawyerInfo.careers_summary
|
|
39
|
+
: lawyerInfo.l_ability;
|
|
40
|
+
if (data) {
|
|
41
|
+
const flag1 = data.length > 30;
|
|
42
|
+
const flag2 = (data === null || data === void 0 ? void 0 : data.split('\n').length) > 1 && (data === null || data === void 0 ? void 0 : data.split('\n')[0].length) > 14;
|
|
43
|
+
setCssFlag(flag1 || flag2);
|
|
44
|
+
}
|
|
45
|
+
}, [lawyerInfo]);
|
|
46
|
+
return (<div className={'relative w-full pb-[120px] max-md:pb-0'}>
|
|
47
|
+
{/*#F8F8F8 배경 768px부터 hidden*/}
|
|
48
|
+
<div className={'absolute bottom-0 h-[386px] w-full bg-[#F8F8F8] max-md:hidden'}></div>
|
|
49
|
+
|
|
50
|
+
<div className={'relative mx-auto max-w-screen-2xl'}>
|
|
51
|
+
<div className={'relative mx-auto h-[630px] w-[90%] max-xl:h-[580px] max-lg:h-[500px] max-md2:h-[450px] max-md:w-full max-xs:h-[360px]'}>
|
|
52
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'} alt={'변호사 리스트 배경'} fill className={'object-cover max-sm:hidden'}/>
|
|
53
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'} alt={'변호사 리스트 배경'} fill className={'object-cover sm:hidden'}/>
|
|
54
|
+
{/*변호사 이미지*/}
|
|
55
|
+
<div className={'absolute bottom-0 left-[50px] h-[569px] w-[515px] overflow-hidden max-xl:h-[510px] max-lg:h-[450px] max-md:left-1/2 max-md:h-[400px] max-md:-translate-x-1/2 max-xs:h-[317px] max-xs:w-[286px]'}>
|
|
56
|
+
<Image src={`${lawyerImagePath}/${lawyerInfo.nukki}`} alt={lawyerInfo.l_name + ' 변호사'} title={lawyerInfo.l_name + ' 변호사'} unoptimized={true} priority={true} sizes="(max-width: 700px)" fill className={'translate-y-7 scale-110 object-contain max-xl:translate-y-5 max-md:object-center max-xs:translate-y-3'}/>
|
|
57
|
+
</div>
|
|
58
|
+
{/*h1 sr_only*/}
|
|
59
|
+
<h1 className={'sr-only'}>
|
|
60
|
+
{lawyerInfo.l_name}{' '}
|
|
61
|
+
{codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name}
|
|
62
|
+
</h1>
|
|
63
|
+
{/*이름 pc*/}
|
|
64
|
+
<p className={'absolute bottom-[128px] right-[100px] z-10 text-right max-xl:bottom-[100px] max-lg:bottom-20 max-lg:right-20 max-md2:bottom-[60px] max-md2:right-[60px] max-md:hidden'}>
|
|
65
|
+
<span className={'mb-1 block text-[70px] font-[800] leading-[1.14] tracking-[-0.9px] max-xl:text-[64px] max-lg:text-[60px] max-md2:mb-0 max-md2:text-[54px] max-xs:text-[40px] '}>
|
|
66
|
+
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
67
|
+
</span>
|
|
68
|
+
{lawyerInfo.l_position ? (<span className={'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
|
|
69
|
+
'max-xl:text-[26px] ' +
|
|
70
|
+
'max-lg:text-[24px] ' +
|
|
71
|
+
'max-md2:text-[22px] '}>
|
|
72
|
+
|
|
73
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
74
|
+
</span>) : (<></>)}
|
|
75
|
+
</p>
|
|
76
|
+
{/*lawyer_code, l_ability, tel pc*/}
|
|
77
|
+
<div className={'absolute bottom-[-50px] right-10 z-10 grid w-full grid-cols-3 place-items-center bg-[#1E395C] text-center text-[24px] leading-[1.25] tracking-[-0.9px] text-white ' +
|
|
78
|
+
'tracking-[-0.9px] ' +
|
|
79
|
+
(cssFlag
|
|
80
|
+
? 'h-[100px] max-w-[1050px] max-xl:h-[110px] max-xl:max-w-[820px] max-lg:h-[100px] max-lg:max-w-[700px] max-md2:h-[90px] max-md2:max-w-[640px] '
|
|
81
|
+
: 'h-[100px] max-w-[900px] max-xl:h-[90px] max-xl:max-w-[800px] max-lg:h-[80px] max-lg:max-w-[700px] max-md2:h-[75px] max-md2:max-w-[640px] ') +
|
|
82
|
+
'max-xl:text-[22px] ' +
|
|
83
|
+
' max-lg:text-[20px] ' +
|
|
84
|
+
'max-md2:right-5 max-md2:text-[18px] ' +
|
|
85
|
+
'max-md:hidden'}>
|
|
86
|
+
<p className={'relative w-full font-[800]'}>
|
|
87
|
+
|
|
88
|
+
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
89
|
+
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
90
|
+
</p>
|
|
91
|
+
<h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
|
|
92
|
+
'relative w-full font-[500]'}>
|
|
93
|
+
{searchColorLawyerText(((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
|
|
94
|
+
? lawyerInfo.careers_summary
|
|
95
|
+
: lawyerInfo.l_ability, integrateSearch)}
|
|
96
|
+
|
|
97
|
+
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
98
|
+
</h2>
|
|
99
|
+
<p className={'flex w-full items-center justify-center gap-2 font-[700]'}>
|
|
100
|
+
{lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
|
|
101
|
+
T. {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
|
|
102
|
+
</Link>)}
|
|
103
|
+
{lawyerInfo.l_email ? (<Link href={'/mail?lawyer=' + lawyerInfo.l_name} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
|
|
104
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/email_icon.webp'} alt={'이메일'} width={64} height={64} className={'w-[38px] max-xl:w-[32px] max-lg:w-[30px] max-xs:w-[26px]'}/>
|
|
105
|
+
</Link>) : (<></>)}
|
|
106
|
+
</p>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
{/*이름 mobile*/}
|
|
112
|
+
<p className={'mx-auto mt-4 w-[90%] md:hidden'}>
|
|
113
|
+
<span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
|
|
114
|
+
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
115
|
+
</span>
|
|
116
|
+
{lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
|
|
117
|
+
|
|
118
|
+
{searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
|
|
119
|
+
</span>) : (<></>)}
|
|
120
|
+
</p>
|
|
121
|
+
|
|
122
|
+
{/*lawyer_code, l_ability, tel mobile*/}
|
|
123
|
+
<div className={'mt-[18px] flex h-[150px] w-[70%] min-w-[340px] flex-col justify-between bg-[#1E395C] px-5 py-[22px] text-[18px] leading-[1.25] tracking-[-0.9px] text-white md:hidden'}>
|
|
124
|
+
<p className={'font-[800]'}>
|
|
125
|
+
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
126
|
+
</p>
|
|
127
|
+
<p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
|
|
128
|
+
{searchColorLawyerText(((_b = lawyerInfo.l_sort_center) === null || _b === void 0 ? void 0 : _b.includes(centerCode)) && lawyerInfo.careers_summary
|
|
129
|
+
? lawyerInfo.careers_summary
|
|
130
|
+
: lawyerInfo.l_ability, integrateSearch)}
|
|
131
|
+
</p>
|
|
132
|
+
<p className={'flex items-center gap-2'}>
|
|
133
|
+
{lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} className={'text-[16px] '} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
|
|
134
|
+
T.{' '}
|
|
135
|
+
<span className={'font-[600] underline underline-offset-[6px]'}>
|
|
136
|
+
{searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
|
|
137
|
+
</span>
|
|
138
|
+
</Link>)}
|
|
139
|
+
{lawyerInfo.l_email ? (<Link href={'/mail?lawyer=' + lawyerInfo.l_name} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
|
|
140
|
+
<Image src={'/images/lawyer/email_icon.webp'} alt={'이메일'} width={64} height={64} className={'w-[38px] max-xl:w-[32px] max-lg:w-[30px] max-xs:w-[26px]'}/>
|
|
141
|
+
</Link>) : (<></>)}
|
|
142
|
+
</p>
|
|
143
|
+
</div>
|
|
144
|
+
</div>);
|
|
145
|
+
};
|
|
146
|
+
export default BasicInfoWrapper;
|