@daeryun/dr_components 0.5.0 → 0.5.1
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.stories.d.ts +1 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +2130 -0
- package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +2141 -0
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +14 -5
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +15 -5
- package/dist/components/page/LawyerDetail/component/CareerList.jsx +7 -7
- package/dist/components/page/LawyerDetail/component/CareerList.tsx +7 -7
- package/dist/components/page/LawyerDetail/component/MobileRelatedPage.jsx +0 -2
- package/dist/components/page/LawyerDetail/component/MobileRelatedPage.tsx +0 -3
- package/dist/components/page/LawyerDetail/component/MobileSpeciality.jsx +0 -2
- package/dist/components/page/LawyerDetail/component/MobileSpeciality.tsx +1 -2
- package/dist/components/page/LawyerDetail/component/PcTabButton.tsx +0 -2
- package/dist/styles/globals.css +0 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
9
9
|
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
10
10
|
const lawyerImagePath = imagePath + '/upload/lawyer';
|
|
11
11
|
const [isMobile, setIsMobile] = useState(false);
|
|
12
|
+
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
13
|
+
const [cssFlag, setCssFlag] = useState(false);
|
|
12
14
|
const handleOnClickLawyerTel = () => {
|
|
13
15
|
if (isMobile) {
|
|
14
16
|
insert('lawyer_tel', isMobile);
|
|
@@ -29,6 +31,14 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
29
31
|
const is_mobile = mobile();
|
|
30
32
|
setIsMobile(is_mobile);
|
|
31
33
|
}, []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
if (lawyerInfo.l_ability) {
|
|
37
|
+
const flag1 = lawyerInfo.l_ability.length > 30;
|
|
38
|
+
const flag2 = ((_a = lawyerInfo.l_ability) === null || _a === void 0 ? void 0 : _a.split('\n').length) > 1 && ((_b = lawyerInfo.l_ability) === null || _b === void 0 ? void 0 : _b.split('\n')[0].length) > 14;
|
|
39
|
+
setCssFlag(flag1 || flag2);
|
|
40
|
+
}
|
|
41
|
+
}, [lawyerInfo]);
|
|
32
42
|
return (<div className={'relative w-full pb-[120px] max-md:pb-0'}>
|
|
33
43
|
{/*#F8F8F8 배경 768px부터 hidden*/}
|
|
34
44
|
<div className={'absolute bottom-0 h-[386px] w-full bg-[#F8F8F8] max-md:hidden'}></div>
|
|
@@ -62,7 +72,7 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
62
72
|
{/*lawyer_code, l_ability, tel pc*/}
|
|
63
73
|
<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 ' +
|
|
64
74
|
'tracking-[-0.9px] ' +
|
|
65
|
-
(
|
|
75
|
+
(cssFlag
|
|
66
76
|
? '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] '
|
|
67
77
|
: '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] ') +
|
|
68
78
|
'max-xl:text-[22px] ' +
|
|
@@ -74,10 +84,9 @@ const BasicInfo = ({ lawyerInfo, codeList, integrateSearch }) => {
|
|
|
74
84
|
{searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
|
|
75
85
|
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
76
86
|
</p>
|
|
77
|
-
<h2 className={(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{lawyerInfo.l_ability}
|
|
87
|
+
<h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
|
|
88
|
+
'relative w-full font-[500]'}>
|
|
89
|
+
{searchColorLawyerText(lawyerInfo.l_ability, integrateSearch)}
|
|
81
90
|
|
|
82
91
|
<span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
|
|
83
92
|
</h2>
|
|
@@ -19,6 +19,8 @@ const BasicInfo = ({
|
|
|
19
19
|
const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
20
20
|
const lawyerImagePath: string = imagePath + '/upload/lawyer';
|
|
21
21
|
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
22
|
+
//lawyerInfo l_ablilty 길이가 너무 긴경우
|
|
23
|
+
const [cssFlag, setCssFlag] = useState<boolean>(false);
|
|
22
24
|
|
|
23
25
|
const handleOnClickLawyerTel = () => {
|
|
24
26
|
if (isMobile) {
|
|
@@ -43,6 +45,15 @@ const BasicInfo = ({
|
|
|
43
45
|
setIsMobile(is_mobile);
|
|
44
46
|
}, []);
|
|
45
47
|
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (lawyerInfo.l_ability) {
|
|
50
|
+
const flag1: boolean = lawyerInfo.l_ability.length > 30;
|
|
51
|
+
const flag2: boolean =
|
|
52
|
+
lawyerInfo.l_ability?.split('\n').length > 1 && lawyerInfo.l_ability?.split('\n')[0].length > 14;
|
|
53
|
+
setCssFlag(flag1 || flag2);
|
|
54
|
+
}
|
|
55
|
+
}, [lawyerInfo]);
|
|
56
|
+
|
|
46
57
|
return (
|
|
47
58
|
<div className={'relative w-full pb-[120px] max-md:pb-0'}>
|
|
48
59
|
{/*#F8F8F8 배경 768px부터 hidden*/}
|
|
@@ -124,7 +135,7 @@ const BasicInfo = ({
|
|
|
124
135
|
className={
|
|
125
136
|
'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 ' +
|
|
126
137
|
'tracking-[-0.9px] ' +
|
|
127
|
-
(
|
|
138
|
+
(cssFlag
|
|
128
139
|
? '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] '
|
|
129
140
|
: '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] ') +
|
|
130
141
|
'max-xl:text-[22px] ' +
|
|
@@ -147,12 +158,11 @@ const BasicInfo = ({
|
|
|
147
158
|
</p>
|
|
148
159
|
<h2
|
|
149
160
|
className={
|
|
150
|
-
(
|
|
151
|
-
|
|
152
|
-
: 'whitespace-pre-wrap break-keep px-3 ') + 'relative w-full font-[500]'
|
|
161
|
+
(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
|
|
162
|
+
'relative w-full font-[500]'
|
|
153
163
|
}
|
|
154
164
|
>
|
|
155
|
-
{lawyerInfo.l_ability}
|
|
165
|
+
{searchColorLawyerText(lawyerInfo.l_ability, integrateSearch)}
|
|
156
166
|
|
|
157
167
|
<span
|
|
158
168
|
className={
|
|
@@ -25,7 +25,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
25
25
|
'max-xl:pl-[26px]'}>
|
|
26
26
|
{careerList
|
|
27
27
|
.filter((item) => item.career_code === 'LC002')
|
|
28
|
-
.map((item, index) => (<li key={index}>
|
|
28
|
+
.map((item, index) => (<li key={'LC002 ' + index}>
|
|
29
29
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
30
30
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
31
31
|
//1280px
|
|
@@ -69,7 +69,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
69
69
|
'max-xl:pl-[26px]'}>
|
|
70
70
|
{careerList
|
|
71
71
|
.filter((item) => item.career_code === 'LC003')
|
|
72
|
-
.map((item, index) => (<li key={index}>
|
|
72
|
+
.map((item, index) => (<li key={'LC003 ' + index}>
|
|
73
73
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
74
74
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
75
75
|
//1280px
|
|
@@ -105,7 +105,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
105
105
|
'max-xl:pl-[26px]'}>
|
|
106
106
|
{careerList
|
|
107
107
|
.filter((item) => item.career_code === 'LC006')
|
|
108
|
-
.map((item, index) => (<li key={index}>
|
|
108
|
+
.map((item, index) => (<li key={'LC006 ' + index}>
|
|
109
109
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
110
110
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
111
111
|
//1280px
|
|
@@ -141,7 +141,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
141
141
|
'max-xl:pl-[26px]'}>
|
|
142
142
|
{careerList
|
|
143
143
|
.filter((item) => item.career_code === 'LC001')
|
|
144
|
-
.map((item, index) => (<li key={index}>
|
|
144
|
+
.map((item, index) => (<li key={'LC001 ' + index}>
|
|
145
145
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
146
146
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
147
147
|
//1280px
|
|
@@ -177,7 +177,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
177
177
|
'max-xl:pl-[26px]'}>
|
|
178
178
|
{careerList
|
|
179
179
|
.filter((item) => item.career_code === 'LC004')
|
|
180
|
-
.map((item, index) => (<li key={index}>
|
|
180
|
+
.map((item, index) => (<li key={'LC004 ' + index}>
|
|
181
181
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
182
182
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
183
183
|
//1280px
|
|
@@ -210,7 +210,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
210
210
|
<ul className={'pl-[36px] ' +
|
|
211
211
|
//768px
|
|
212
212
|
'max-xl:pl-[26px]'}>
|
|
213
|
-
{certiList.map((item, index) => (<li key={index}>
|
|
213
|
+
{certiList.map((item, index) => (<li key={'자격증 ' + index}>
|
|
214
214
|
<span className={'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
215
215
|
'before:absolute before:left-[-30px] before:mr-[5px] before:inline-block before:scale-[1.5] before:text-[#D0D0D0] before:content-["•"] ' +
|
|
216
216
|
//1280px
|
|
@@ -245,7 +245,7 @@ const CareerList = ({ lawyerInfo, careerList, certiList, codeList, speciality, s
|
|
|
245
245
|
const careerTxt = item.career_txt
|
|
246
246
|
? item.career_txt.replace('일반소송', '민사').replace('중재', '손해배상')
|
|
247
247
|
: '';
|
|
248
|
-
return (<Link href={url} target="_blank" key={index} className={'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] ' +
|
|
248
|
+
return (<Link href={url} target="_blank" key={'관련 업무분야 ' + index} className={'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] ' +
|
|
249
249
|
'group hover:border-[#285FA7] hover:text-[#285FA7] '}>
|
|
250
250
|
<span className={'flex items-center gap-[2px]'}>
|
|
251
251
|
<Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/hover_off.webp'} alt={careerTxt + '전문변호사'} width={6} height={6} className={'group-hover:hidden'}/>
|
|
@@ -72,7 +72,7 @@ const CareerList = ({
|
|
|
72
72
|
{careerList
|
|
73
73
|
.filter((item: any) => item.career_code === 'LC002')
|
|
74
74
|
.map((item: any, index) => (
|
|
75
|
-
<li key={index}>
|
|
75
|
+
<li key={'LC002 ' + index}>
|
|
76
76
|
<span
|
|
77
77
|
className={
|
|
78
78
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -147,7 +147,7 @@ const CareerList = ({
|
|
|
147
147
|
{careerList
|
|
148
148
|
.filter((item: any) => item.career_code === 'LC003')
|
|
149
149
|
.map((item: any, index) => (
|
|
150
|
-
<li key={index}>
|
|
150
|
+
<li key={'LC003 ' + index}>
|
|
151
151
|
<span
|
|
152
152
|
className={
|
|
153
153
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -203,7 +203,7 @@ const CareerList = ({
|
|
|
203
203
|
{careerList
|
|
204
204
|
.filter((item: any) => item.career_code === 'LC006')
|
|
205
205
|
.map((item: any, index) => (
|
|
206
|
-
<li key={index}>
|
|
206
|
+
<li key={'LC006 ' + index}>
|
|
207
207
|
<span
|
|
208
208
|
className={
|
|
209
209
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -259,7 +259,7 @@ const CareerList = ({
|
|
|
259
259
|
{careerList
|
|
260
260
|
.filter((item: any) => item.career_code === 'LC001')
|
|
261
261
|
.map((item: any, index) => (
|
|
262
|
-
<li key={index}>
|
|
262
|
+
<li key={'LC001 ' + index}>
|
|
263
263
|
<span
|
|
264
264
|
className={
|
|
265
265
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -316,7 +316,7 @@ const CareerList = ({
|
|
|
316
316
|
{careerList
|
|
317
317
|
.filter((item: any) => item.career_code === 'LC004')
|
|
318
318
|
.map((item: any, index) => (
|
|
319
|
-
<li key={index}>
|
|
319
|
+
<li key={'LC004 ' + index}>
|
|
320
320
|
<span
|
|
321
321
|
className={
|
|
322
322
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -370,7 +370,7 @@ const CareerList = ({
|
|
|
370
370
|
}
|
|
371
371
|
>
|
|
372
372
|
{certiList.map((item: any, index: number) => (
|
|
373
|
-
<li key={index}>
|
|
373
|
+
<li key={'자격증 ' + index}>
|
|
374
374
|
<span
|
|
375
375
|
className={
|
|
376
376
|
'relative text-[20px] font-[400] leading-[40px] tracking-[-0.5px] ' +
|
|
@@ -427,7 +427,7 @@ const CareerList = ({
|
|
|
427
427
|
<Link
|
|
428
428
|
href={url}
|
|
429
429
|
target="_blank"
|
|
430
|
-
key={index}
|
|
430
|
+
key={'관련 업무분야 ' + index}
|
|
431
431
|
className={
|
|
432
432
|
'mr-[5px] mt-[5px] inline-block basis-[100%] flex-wrap rounded-[20px] border-[1px] border-solid border-[#dfdfdf] px-[10px] py-[4px] text-[16px] font-[700] tracking-[-0.9px] text-[#555] ' +
|
|
433
433
|
'group hover:border-[#285FA7] hover:text-[#285FA7] '
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import Link from 'next/link';
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useTranslation } from 'next-i18next';
|
|
5
4
|
const MobileRelatedPage = ({ lawyerInfo, broadcastList, reviewList, successList, isLawyer }) => {
|
|
6
|
-
const { t } = useTranslation('common');
|
|
7
5
|
return (<span className={'flex w-full gap-[20px] lg:hidden ' +
|
|
8
6
|
//768px
|
|
9
7
|
'max-md:gap-2 ' +
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Link from 'next/link';
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useTranslation } from 'next-i18next';
|
|
5
4
|
import { IBoard, ILawyer, ISuccess } from '../ILawyerDetailTypes';
|
|
6
5
|
|
|
7
6
|
const MobileRelatedPage = ({
|
|
@@ -17,8 +16,6 @@ const MobileRelatedPage = ({
|
|
|
17
16
|
reviewList: IBoard[];
|
|
18
17
|
successList: ISuccess[];
|
|
19
18
|
}) => {
|
|
20
|
-
const { t } = useTranslation('common');
|
|
21
|
-
|
|
22
19
|
return (
|
|
23
20
|
<span
|
|
24
21
|
className={
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import Link from 'next/link';
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import { useTranslation } from 'next-i18next';
|
|
5
4
|
import { searchColorLawyerText } from '../../../common/integrate';
|
|
6
5
|
const MobileSpeciality = ({ speciality, codeList, maxLines, integrateSearch }) => {
|
|
7
|
-
const { t } = useTranslation('common'); //모바일 전문분야 더보기 버튼
|
|
8
6
|
const [mobileCareerViewMore, setMobileCareerViewMore] = useState(false);
|
|
9
7
|
return (<section className={'mx-auto mt-[80px] max-w-screen-2xl ' +
|
|
10
8
|
//1024px
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Link from 'next/link';
|
|
2
2
|
import Image from 'next/image';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import { ILawyerCareer } from '../ILawyerDetailTypes';
|
|
6
6
|
import { searchColorLawyerText } from '../../../common/integrate';
|
|
7
7
|
|
|
@@ -16,7 +16,6 @@ const MobileSpeciality = ({
|
|
|
16
16
|
codeList: any[];
|
|
17
17
|
integrateSearch: string;
|
|
18
18
|
}) => {
|
|
19
|
-
const { t } = useTranslation('common'); //모바일 전문분야 더보기 버튼
|
|
20
19
|
const [mobileCareerViewMore, setMobileCareerViewMore] = useState<boolean>(false);
|
|
21
20
|
return (
|
|
22
21
|
<section
|
package/dist/styles/globals.css
CHANGED
|
@@ -12047,10 +12047,6 @@ body {
|
|
|
12047
12047
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
12048
12048
|
}
|
|
12049
12049
|
|
|
12050
|
-
.xl\:whitespace-pre-wrap {
|
|
12051
|
-
white-space: pre-wrap;
|
|
12052
|
-
}
|
|
12053
|
-
|
|
12054
12050
|
.xl\:px-\[20px\] {
|
|
12055
12051
|
padding-left: 20px;
|
|
12056
12052
|
padding-right: 20px;
|