@daeryun/dr_components 0.5.66 → 0.5.68
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/Integrate/Lawyer.jsx +10 -6
- package/dist/components/page/Integrate/Lawyer.tsx +25 -7
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +1 -1
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +1 -1
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +11 -3
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +40 -13
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { NoResult } from './NoResult';
|
|
3
3
|
import { Title } from './Title';
|
|
4
4
|
import { ViewMore } from './ViewMore';
|
|
@@ -58,7 +58,7 @@ const Lawyer = (props) => {
|
|
|
58
58
|
? allTabList
|
|
59
59
|
: list.lawyerList.slice(0, 8)
|
|
60
60
|
: list.lawyerList).map((item, index) => {
|
|
61
|
-
return (<
|
|
61
|
+
return (<IntegrateLawyer key={item.id} center_code={props.center_code} item={item} lawyerImagePath={lawyerImagePath}/>);
|
|
62
62
|
})}
|
|
63
63
|
</div>
|
|
64
64
|
{tab != '전체' && (<ViewMore flag={list.lawyerList.length != listCount.lawyer} func={() => {
|
|
@@ -73,11 +73,14 @@ const Lawyer = (props) => {
|
|
|
73
73
|
</>)) : null;
|
|
74
74
|
};
|
|
75
75
|
export default Lawyer;
|
|
76
|
-
const
|
|
76
|
+
const IntegrateLawyer = (props) => {
|
|
77
77
|
var _a;
|
|
78
78
|
const { item, lawyerImagePath, selectedFilter = '', onClickTel, isPro = false } = props;
|
|
79
79
|
const searchParams = useSearchParams();
|
|
80
80
|
const [search, setSearch] = useState('');
|
|
81
|
+
const isEven = useMemo(() => {
|
|
82
|
+
return Number(item.id.replace('tmp_', '')) % 2 === 0;
|
|
83
|
+
}, [item]);
|
|
81
84
|
useEffect(() => {
|
|
82
85
|
const searchQuery = searchParams.get('search');
|
|
83
86
|
setSearch(searchQuery ? String(searchQuery) : '');
|
|
@@ -89,7 +92,8 @@ const LawyerContainer = (props) => {
|
|
|
89
92
|
pathname: '/lawyer/' + item.id,
|
|
90
93
|
query: search != '' ? { integrate_search: search } : {}
|
|
91
94
|
}} tabIndex={-1}>
|
|
92
|
-
<div className={'relative flex items-center justify-center
|
|
95
|
+
<div className={'relative flex items-center justify-center '}>
|
|
96
|
+
{isEven ? (<Image src={`${process.env.NEXT_PUBLIC_S3_URL}/lawyer/list_bg.webp`} alt={'변호사 리스트 배경'} fill className={'object-cover'}/>) : (<Image src={`${process.env.NEXT_PUBLIC_S3_URL}/lawyer/list_bg2.webp`} alt={'변호사 리스트 배경'} fill className={'object-cover'}/>)}
|
|
93
97
|
<Image loading={'lazy'} src={lawyerImagePath + '/' + item.nukki} alt={item.careers &&
|
|
94
98
|
item.careers.indexOf(selectedFilter) > -1 &&
|
|
95
99
|
selectedFilter !== '전체'
|
|
@@ -98,8 +102,8 @@ const LawyerContainer = (props) => {
|
|
|
98
102
|
item.careers.indexOf(selectedFilter) > -1 &&
|
|
99
103
|
selectedFilter !== '전체'
|
|
100
104
|
? `${selectedFilter}전문변호사 ${item.name} ${item.code}`
|
|
101
|
-
: `${item.name} ${item.code}`} width={210} height={280} className={'mt-6 h-auto w-[90%]'} quality={100}/>
|
|
102
|
-
{item.mark ? (<Mark type={item.mark} color={'
|
|
105
|
+
: `${item.name} ${item.code}`} width={210} height={280} className={'z-10 mt-6 h-auto w-[90%]'} quality={100}/>
|
|
106
|
+
{item.mark ? (<Mark type={item.mark} color={'white'} className={'absolute bottom-[15px] right-[15px] z-20 h-auto w-[25%]'}/>) : (<></>)}
|
|
103
107
|
</div>
|
|
104
108
|
</Link>
|
|
105
109
|
<div className={'m-3 flex h-full flex-col justify-between'}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { NoResult } from './NoResult';
|
|
3
3
|
import { Title } from './Title';
|
|
4
4
|
import { ILawyerTypes, IListPagesType, IListTypes } from './integrateType';
|
|
@@ -103,7 +103,7 @@ const Lawyer = (props: {
|
|
|
103
103
|
: list.lawyerList
|
|
104
104
|
).map((item, index: number) => {
|
|
105
105
|
return (
|
|
106
|
-
<
|
|
106
|
+
<IntegrateLawyer
|
|
107
107
|
key={item.id}
|
|
108
108
|
center_code={props.center_code}
|
|
109
109
|
item={item}
|
|
@@ -148,7 +148,7 @@ interface ILawyerProData extends ILawyerTypes {
|
|
|
148
148
|
thumbnail?: string;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
const
|
|
151
|
+
const IntegrateLawyer = (props: {
|
|
152
152
|
item: ILawyerProData;
|
|
153
153
|
lawyerImagePath: string;
|
|
154
154
|
center_code: string;
|
|
@@ -159,6 +159,9 @@ const LawyerContainer = (props: {
|
|
|
159
159
|
const { item, lawyerImagePath, selectedFilter = '', onClickTel, isPro = false } = props;
|
|
160
160
|
const searchParams = useSearchParams();
|
|
161
161
|
const [search, setSearch] = useState<string>('');
|
|
162
|
+
const isEven = useMemo(() => {
|
|
163
|
+
return Number(item.id.replace('tmp_', '')) % 2 === 0;
|
|
164
|
+
}, [item]);
|
|
162
165
|
|
|
163
166
|
useEffect(() => {
|
|
164
167
|
const searchQuery = searchParams.get('search');
|
|
@@ -176,7 +179,22 @@ const LawyerContainer = (props: {
|
|
|
176
179
|
}}
|
|
177
180
|
tabIndex={-1}
|
|
178
181
|
>
|
|
179
|
-
<div className={'relative flex items-center justify-center
|
|
182
|
+
<div className={'relative flex items-center justify-center '}>
|
|
183
|
+
{isEven ? (
|
|
184
|
+
<Image
|
|
185
|
+
src={`${process.env.NEXT_PUBLIC_S3_URL}/lawyer/list_bg.webp`}
|
|
186
|
+
alt={'변호사 리스트 배경'}
|
|
187
|
+
fill
|
|
188
|
+
className={'object-cover'}
|
|
189
|
+
/>
|
|
190
|
+
) : (
|
|
191
|
+
<Image
|
|
192
|
+
src={`${process.env.NEXT_PUBLIC_S3_URL}/lawyer/list_bg2.webp`}
|
|
193
|
+
alt={'변호사 리스트 배경'}
|
|
194
|
+
fill
|
|
195
|
+
className={'object-cover'}
|
|
196
|
+
/>
|
|
197
|
+
)}
|
|
180
198
|
<Image
|
|
181
199
|
loading={'lazy'}
|
|
182
200
|
src={lawyerImagePath + '/' + item.nukki}
|
|
@@ -196,14 +214,14 @@ const LawyerContainer = (props: {
|
|
|
196
214
|
}
|
|
197
215
|
width={210}
|
|
198
216
|
height={280}
|
|
199
|
-
className={'mt-6 h-auto w-[90%]'}
|
|
217
|
+
className={'z-10 mt-6 h-auto w-[90%]'}
|
|
200
218
|
quality={100}
|
|
201
219
|
/>
|
|
202
220
|
{item.mark ? (
|
|
203
221
|
<Mark
|
|
204
222
|
type={item.mark}
|
|
205
|
-
color={'
|
|
206
|
-
className={'absolute bottom-[15px] right-[15px] h-auto w-[25%]'}
|
|
223
|
+
color={'white'}
|
|
224
|
+
className={'absolute bottom-[15px] right-[15px] z-20 h-auto w-[25%]'}
|
|
207
225
|
/>
|
|
208
226
|
) : (
|
|
209
227
|
<></>
|
|
@@ -2495,7 +2495,7 @@ const lawyerData = {
|
|
|
2495
2495
|
const lawyerData2 = {
|
|
2496
2496
|
centerCode: 'CT0001',
|
|
2497
2497
|
lawyerInfo: {
|
|
2498
|
-
l_id: '
|
|
2498
|
+
l_id: 'tmp_20250305050551',
|
|
2499
2499
|
l_name: '송진성',
|
|
2500
2500
|
l_name_en: 'JinSung SONG',
|
|
2501
2501
|
l_ability: '대법원 재판연구관 민사조 의료담당 경력\n의사 자격 보유 변호사',
|
|
@@ -2509,7 +2509,7 @@ const lawyerData = {
|
|
|
2509
2509
|
const lawyerData2 = {
|
|
2510
2510
|
centerCode: 'CT0001',
|
|
2511
2511
|
lawyerInfo: {
|
|
2512
|
-
l_id: '
|
|
2512
|
+
l_id: 'tmp_20250305050551',
|
|
2513
2513
|
l_name: '송진성',
|
|
2514
2514
|
l_name_en: 'JinSung SONG',
|
|
2515
2515
|
l_ability: '대법원 재판연구관 민사조 의료담당 경력\n의사 자격 보유 변호사',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { insert } from '../../../../lib/conversion';
|
|
5
5
|
import * as gtag from '../../../../lib/gtag';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
@@ -13,6 +13,9 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
13
13
|
const [isMobile, setIsMobile] = useState(false);
|
|
14
14
|
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
15
15
|
const [cssFlag, setCssFlag] = useState(false);
|
|
16
|
+
const isEven = useMemo(() => {
|
|
17
|
+
return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
|
|
18
|
+
}, [lawyerInfo]);
|
|
16
19
|
const handleOnClickLawyerTel = () => {
|
|
17
20
|
if (isMobile) {
|
|
18
21
|
insert('lawyer_tel', isMobile);
|
|
@@ -54,8 +57,13 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
54
57
|
<Container isUseWrapper={isUseWrapper}>
|
|
55
58
|
<div className={'relative mx-auto h-[630px] max-xl:h-[580px] max-lg:h-[500px] max-md2:h-[450px] max-md:w-full max-xs:h-[360px] ' +
|
|
56
59
|
(isUseWrapper ? '' : ' w-[90%] ')}>
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
{isEven ? (<>
|
|
61
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'}/>
|
|
62
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
|
|
63
|
+
</>) : (<>
|
|
64
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc2.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'} unoptimized/>
|
|
65
|
+
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo2.webp'} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
|
|
66
|
+
</>)}
|
|
59
67
|
{/*변호사 이미지*/}
|
|
60
68
|
<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]'}>
|
|
61
69
|
<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'}/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { insert } from '../../../../lib/conversion';
|
|
5
5
|
import * as gtag from '../../../../lib/gtag';
|
|
6
6
|
import mobile from 'is-mobile';
|
|
@@ -26,6 +26,9 @@ const BasicInfo = ({
|
|
|
26
26
|
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
27
27
|
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
28
28
|
const [cssFlag, setCssFlag] = useState<boolean>(false);
|
|
29
|
+
const isEven = useMemo(() => {
|
|
30
|
+
return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
|
|
31
|
+
}, [lawyerInfo]);
|
|
29
32
|
|
|
30
33
|
const handleOnClickLawyerTel = () => {
|
|
31
34
|
if (isMobile) {
|
|
@@ -82,18 +85,42 @@ const BasicInfo = ({
|
|
|
82
85
|
(isUseWrapper ? '' : ' w-[90%] ')
|
|
83
86
|
}
|
|
84
87
|
>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
{isEven ? (
|
|
89
|
+
<>
|
|
90
|
+
<Image
|
|
91
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc.webp'}
|
|
92
|
+
alt={'변호사 리스트 배경'}
|
|
93
|
+
fill
|
|
94
|
+
quality={100}
|
|
95
|
+
className={'object-cover max-sm:hidden'}
|
|
96
|
+
/>
|
|
97
|
+
<Image
|
|
98
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo.webp'}
|
|
99
|
+
alt={'변호사 리스트 배경'}
|
|
100
|
+
fill
|
|
101
|
+
quality={100}
|
|
102
|
+
className={'object-cover sm:hidden'}
|
|
103
|
+
/>
|
|
104
|
+
</>
|
|
105
|
+
) : (
|
|
106
|
+
<>
|
|
107
|
+
<Image
|
|
108
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc2.webp'}
|
|
109
|
+
alt={'변호사 리스트 배경'}
|
|
110
|
+
fill
|
|
111
|
+
quality={100}
|
|
112
|
+
className={'object-cover max-sm:hidden'}
|
|
113
|
+
unoptimized
|
|
114
|
+
/>
|
|
115
|
+
<Image
|
|
116
|
+
src={'https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo2.webp'}
|
|
117
|
+
alt={'변호사 리스트 배경'}
|
|
118
|
+
fill
|
|
119
|
+
quality={100}
|
|
120
|
+
className={'object-cover sm:hidden'}
|
|
121
|
+
/>
|
|
122
|
+
</>
|
|
123
|
+
)}
|
|
97
124
|
{/*변호사 이미지*/}
|
|
98
125
|
<div
|
|
99
126
|
className={
|