@daeryun/dr_components 0.7.62 → 0.7.67

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.
@@ -6,6 +6,7 @@ import * as gtag from '../../../../lib/gtag';
6
6
  import mobile from 'is-mobile';
7
7
  import { searchColorLawyerText } from '../../../common/integrate';
8
8
  import { Wrapper } from '../../../index';
9
+ import YoutubeLawyerModal from '../../../../components/Model/YoutubeLawyerModal';
9
10
  const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSearch }) => {
10
11
  var _a, _b;
11
12
  const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
@@ -13,11 +14,12 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
13
14
  const [isMobile, setIsMobile] = useState(false);
14
15
  //lawyerInfo l_ablilty 길이가 너무 긴경우
15
16
  const [cssFlag, setCssFlag] = useState(false);
17
+ const [modalOn, setModalOn] = useState(false);
16
18
  const isEven = useMemo(() => {
17
19
  return Number(lawyerInfo.l_id.replace('tmp_', '')) % 2 === 0;
18
20
  }, [lawyerInfo]);
19
21
  const fixBg = useMemo(() => {
20
- return lawyerInfo.l_id === 'tmp_20250415015844';
22
+ return lawyerInfo.l_id === 'tmp_20250415015844' || lawyerInfo.l_id === 'tmp_20250617111027';
21
23
  }, [lawyerInfo]);
22
24
  const handleOnClickLawyerTel = () => {
23
25
  if (isMobile) {
@@ -53,39 +55,53 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
53
55
  const Container = ({ isUseWrapper, children }) => {
54
56
  return isUseWrapper ? (<Wrapper className={'max-md:!px-0'}>{children}</Wrapper>) : (<div className={'relative mx-auto max-w-screen-2xl'}>{children}</div>);
55
57
  };
56
- return (<div className={'relative w-full pb-[120px] max-md:pb-0'}>
57
- {/*#F8F8F8 배경 768px부터 hidden*/}
58
- <div className={'absolute bottom-0 h-[386px] w-full bg-[#F8F8F8] max-md:hidden'}></div>
58
+ return (<>
59
+ <YoutubeLawyerModal onClick={() => {
60
+ setModalOn(false);
61
+ }} isYoutubeOn={modalOn} youtubeId={lawyerInfo.l_introduce_shorts}/>
59
62
 
60
- <Container isUseWrapper={isUseWrapper}>
61
- <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] ' +
63
+ <div className={'relative w-full pb-[120px] max-md:pb-0'}>
64
+ {/*#F8F8F8 배경 768px부터 hidden*/}
65
+ <div className={'absolute bottom-0 h-[386px] w-full bg-[#F8F8F8] max-md:hidden'}></div>
66
+
67
+ <Container isUseWrapper={isUseWrapper}>
68
+ <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] ' +
62
69
  (isUseWrapper ? '' : ' w-[90%] ')}>
63
- <Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'}/>
64
- <Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
65
- {/*변호사 이미지*/}
66
- <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]'}>
67
- <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'}/>
68
- </div>
69
- {/*h1 sr_only*/}
70
- <h1 className={'sr-only'}>
71
- {lawyerInfo.l_name}{' '}
72
- {codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name}
73
- </h1>
74
- {/*이름 pc*/}
75
- <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'}>
76
- <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] '}>
77
- {searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
78
- </span>
79
- {lawyerInfo.l_position ? (<span className={'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
70
+ <Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_pc${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover max-sm:hidden'}/>
71
+ <Image src={`https://d1tgonli21s4df.cloudfront.net/lawyer/bg_mo${fixBg ? '3' : isEven ? '' : '2'}.webp`} alt={'변호사 리스트 배경'} fill quality={100} className={'object-cover sm:hidden'}/>
72
+ {/*변호사 이미지*/}
73
+ <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]'}>
74
+ <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'}/>
75
+ </div>
76
+ {/*h1 sr_only*/}
77
+ <h1 className={'sr-only'}>
78
+ {lawyerInfo.l_name}{' '}
79
+ {codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name}
80
+ </h1>
81
+ {/*이름 pc*/}
82
+ <div 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'}>
83
+ <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] '}>
84
+ {searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
85
+ </span>
86
+ {lawyerInfo.l_position ? (<span className={'text-[28px] font-[500] leading-[1.42] tracking-[-0.7px] ' +
80
87
  'max-xl:text-[26px] ' +
81
88
  'max-lg:text-[24px] ' +
82
89
  'max-md2:text-[22px] '}>
83
- &nbsp;
84
- {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
85
- </span>) : (<></>)}
86
- </p>
87
- {/*lawyer_code, l_ability, tel pc*/}
88
- <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 ' +
90
+ &nbsp;
91
+ {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
92
+ </span>) : (<></>)}
93
+
94
+ {lawyerInfo.l_introduce_shorts && (<div className={'flex h-[49px] w-[189px] items-center justify-center gap-[4px] rounded-[24.5px] bg-[#fff] text-[22px] font-[600]'} onClick={() => {
95
+ setModalOn(true);
96
+ }}>
97
+ {' '}
98
+ <Image src={'/images/youtube_logo.png'} alt={'유튜브'} width={50} height={20} className={'shrink-0ㄴ'}/>
99
+ 소개영상
100
+ <Image src={'/images/youtube_arrow.png'} alt={'유튜브'} width={13} height={14} className={'h-[14px]'}/>
101
+ </div>)}
102
+ </div>
103
+ {/*lawyer_code, l_ability, tel pc*/}
104
+ <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 ' +
89
105
  'tracking-[-0.9px] ' +
90
106
  (cssFlag
91
107
  ? 'h-[100px] max-w-[1050px] max-xl:h-[110px] max-xl:max-w-[800px] max-lg:h-[100px] max-lg:max-w-[700px] max-md2:h-[90px] max-md2:max-w-[640px] '
@@ -94,63 +110,73 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
94
110
  ' max-lg:text-[20px] ' +
95
111
  'max-md2:right-5 max-md2:text-[18px] ' +
96
112
  'max-md:hidden'}>
97
- <p className={'relative w-full font-[800]'}>
98
- &nbsp;
99
- {searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
100
- <span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
101
- </p>
102
- <h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
113
+ <p className={'relative w-full font-[800]'}>
114
+ &nbsp;
115
+ {searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
116
+ <span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
117
+ </p>
118
+ <h2 className={(cssFlag ? 'break-keep px-1 ' : 'whitespace-pre-wrap break-keep px-3 ') +
103
119
  'relative w-full font-[500]'}>
104
- {searchColorLawyerText(((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
120
+ {searchColorLawyerText(((_a = lawyerInfo.l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(centerCode)) && lawyerInfo.careers_summary
105
121
  ? lawyerInfo.careers_summary
106
122
  : lawyerInfo.l_ability, integrateSearch)}
107
123
 
108
- <span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
109
- </h2>
110
- <p className={'flex w-full items-center justify-center gap-2 font-[700]'}>
111
- {lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
112
- T. {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
113
- </Link>)}
114
- {lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
115
- <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]'}/>
116
- </Link>) : (<></>)}
117
- </p>
124
+ <span className={'absolute right-0 top-1/2 block h-[50px] w-[2px] -translate-y-1/2 bg-white bg-opacity-20'}></span>
125
+ </h2>
126
+ <p className={'flex w-full items-center justify-center gap-2 font-[700]'}>
127
+ {lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
128
+ T. {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
129
+ </Link>)}
130
+ {lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
131
+ <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]'}/>
132
+ </Link>) : (<></>)}
133
+ </p>
134
+ </div>
118
135
  </div>
136
+ </Container>
137
+ {/*이름 mobile*/}
138
+ <div className={'mx-auto mt-4 md:hidden ' + (isUseWrapper ? 'max-md:px-10 max-2sm:px-5' : ' w-[90%] ')}>
139
+ <span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
140
+ {searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
141
+ </span>
142
+ {lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
143
+ &nbsp;
144
+ {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
145
+ </span>) : (<></>)}
146
+
147
+ {lawyerInfo.l_introduce_shorts && (<div className={'flex h-[49px] w-[189px] items-center justify-center gap-[4px] rounded-[24.5px] bg-[#fff] text-[22px] font-[600]'} onClick={() => {
148
+ setModalOn(true);
149
+ }}>
150
+ {' '}
151
+ <Image src={'/images/youtube_logo.png'} alt={'유튜브'} width={50} height={20} className={'shrink-0'}/>
152
+ 소개영상
153
+ <Image src={'/images/youtube_arrow.png'} alt={'유튜브'} width={13} height={14} className={'h-[14px]'}/>
154
+ </div>)}
119
155
  </div>
120
- </Container>
121
- {/*이름 mobile*/}
122
- <p className={'mx-auto mt-4 md:hidden ' + (isUseWrapper ? 'max-md:px-10 max-2sm:px-5' : ' w-[90%] ')}>
123
- <span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px] '}>
124
- {searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
125
- </span>
126
- {lawyerInfo.l_position ? (<span className={'text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px] '}>
127
- &nbsp;
128
- {searchColorLawyerText(lawyerInfo.l_position, integrateSearch)}
129
- </span>) : (<></>)}
130
- </p>
131
156
 
132
- {/*lawyer_code, l_ability, tel mobile*/}
133
- <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'}>
134
- <p className={'font-[800]'}>
135
- {searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
136
- </p>
137
- <p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
138
- {searchColorLawyerText(((_b = lawyerInfo.l_sort_center) === null || _b === void 0 ? void 0 : _b.includes(centerCode)) && lawyerInfo.careers_summary
157
+ {/*lawyer_code, l_ability, tel mobile*/}
158
+ <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'}>
159
+ <p className={'font-[800]'}>
160
+ {searchColorLawyerText(codeList.filter((item) => item.code === lawyerInfo.lawyer_code)[0].code_name, integrateSearch)}
161
+ </p>
162
+ <p className={'font-[500] max-2sm:whitespace-pre-wrap'}>
163
+ {searchColorLawyerText(((_b = lawyerInfo.l_sort_center) === null || _b === void 0 ? void 0 : _b.includes(centerCode)) && lawyerInfo.careers_summary
139
164
  ? lawyerInfo.careers_summary
140
165
  : lawyerInfo.l_ability, integrateSearch)}
141
- </p>
142
- <p className={'flex items-center gap-2'}>
143
- {lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} className={'text-[16px] '} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
144
- T.{' '}
145
- <span className={'font-[600] underline underline-offset-[6px]'}>
146
- {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
147
- </span>
148
- </Link>)}
149
- {lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
150
- <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]'}/>
151
- </Link>) : (<></>)}
152
- </p>
166
+ </p>
167
+ <p className={'flex items-center gap-2'}>
168
+ {lawyerInfo.l_tel && (<Link href={'tel:' + lawyerInfo.l_tel} onClick={handleOnClickLawyerTel} className={'text-[16px] '} aria-label={lawyerInfo.l_name + '변호사에게 전화하기 ' + lawyerInfo.l_tel}>
169
+ T.{' '}
170
+ <span className={'font-[600] underline underline-offset-[6px]'}>
171
+ {searchColorLawyerText(lawyerInfo.l_tel, integrateSearch)}
172
+ </span>
173
+ </Link>)}
174
+ {lawyerInfo.l_email ? (<Link href={`${process.env.NEXT_PUBLIC_MAIN_DOMAIN}/mail?lawyer=${lawyerInfo.l_name}`} rel={'nofollow'} className={'block w-fit'} aria-label={lawyerInfo.l_name + '변호사에게 메일보내기 ' + lawyerInfo.l_email}>
175
+ <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]'}/>
176
+ </Link>) : (<></>)}
177
+ </p>
178
+ </div>
153
179
  </div>
154
- </div>);
180
+ </>);
155
181
  };
156
182
  export default BasicInfo;